Closed adelf closed 3 months ago
I would like to see:
I really like changes in recent version. Thank you!
i would love to see:
Please add "$fillable" checkbox next to nullable which is automatically checked
Maybe if you check 'Create factory' then model should have HasFactory
trait
use Illuminate\Database\Eloquent\Factories\HasFactory;
class ModelName extends Model
{
use HasFactory
@Antons-S totally forgot. Fixed. Thank you!
it would be great to see there editable length for string, also decimal type for MySql is also great feature, with editable "total" and "places" fields
Since we can create Models in non default namespace, e.g: Modules\Buildings\Models, would be interesting if the Factory was created on same namespace (Modules\Buildings\Factories) and uses the newFactory() method on Model to assign the factory correctly, since it is not on default namespace Database\Factories.
Great, but it's not using the overriden stubs :/
when it comes to foreign keys and the suggestions above, i didn't see the mention of the option cascadeOnDelete
& cascadeOnUpdate
, Events & Observers, may be a trait attaching area too ?
Ideas:
$primaryKey
), getRouteKeyName(): string
).Would be great to have an option to generate php-doc with model attributes.
It would be nice to have $table
property also. It would be optional (which is the default behavior). But you can add a custom table name in $table
property to associate the model to the provided table name.
Thank you for the great plugin ❤️
This plugin is wonderfull!!
It would be nice to to add the phpdoc @property
for every db column on model created.
Hmm, i don't think so. The plugin itself does this work to avoid these annotations on code...
I like to use ULIDs (or UUID) as primary keys, it would be nice to se that as an option, or an overall config for a given site with the HasULIDs or HasUUIDs trait auto added to the model.
Overall though this is really great and love what you've done. Well worth the money.
This is a great addition, thank you! The only thing I'd love to see is auto-generated TypeScript type definitions for our models... 😎😍
A checkbox in this new UI would be great, but it'd be an awesome utility elsewhere in the plugin too. Cheers!
Please add functions as remove field or setting order fields with moving up and down.
Polymorphic checkbox would be nice
Please add decimal to the type list and add comment to the field.
An option for generating Pivot models would be nice too.
php artisan make:model Member --pivot
It would be nice if added button to remove field
Just want to second @raveren's point that not leveraging overridden stubs.
A good example of this is multitenancy and having overridden stubs to make sure the tenant id is added to every model, factory and migration moving forward. This way removing the field becomes a conscious decision rather than an oversight.
It would be nice if there was support for enum's too. Ideally when enum is selected it would have a list of all backed enums to select from, and then automatically pull the values into the migration and add the cast to the model.
Being able to create a new enum as part of creating the model would be extra-nice.
Just want to second @raveren's point that not leveraging overridden stubs. A good example of this is multitenancy and having overridden stubs to make sure the tenant id is added to every model, factory and migration moving forward. This way removing the field becomes a conscious decision rather than an oversight.
You(and every package creator for their packages) will be able to add an option to the right part(id, timestamps). If it checked - some fields will be added to migration, some traits to the model... and so on.
@davidseverwright good idea. Thanks. I'll try.
@adelf there's much more power in the custom stubs and Laravel did not make them customizeable for no reason.
For example I use them to support our HUGE systems historically, unfortunately, custom-named created_at columns and some other stuff. I had to extend Blueprints
inbuilt class for that.
Wonderful plugin which I use a lot. Like others would like to see additional fields for String Sizes. Add Foreign and ForeignIDs, Enum With Options Field (Not 100% sure about this one since there's debate whether we should use enums and the practibility of adding a field list).
Would love to be able to reorder fields once I've filled them in, and the ability to choose the date
type instead of just datetime
would be useful.
Also the ability to access the rest of the project while the modal is open would be nice, as I often need to refer back to the code while creating a new model to check the relationships.
Great plugin!
I deal with a bunch of 3rd party data where the table structure is essentially already done. A lot of these have a bunch of columns(50+ sometimes).
It would be nice to see the following things:
date
column type, currently it's just the dateTime
column type.string("my_field", 4)
.unique
.I am not the maintainer or even a contributor to the project, but I think it should be clear to everyone that it is impossible to integrate the entire Eloquent Framework into a single window. Therefore, we have to focus on core elements that are annoying to write by hand. Many features mentioned here are certainly practical, but impossible to implement in their entirety.
I am not the maintainer or even a contributor to the project, but I think it should be clear to everyone that it is impossible to integrate the entire Eloquent Framework into a single window. Therefore, we have to focus on core elements that are annoying to write by hand. Many features mentioned here are certainly practical, but impossible to implement in their entirety.
@silas229 The field types isn't impossible, and so are many of the suggestions.
@silas229 The field types isn't impossible, and so are many of the suggestions.
Of course, it is possible to implement them, but if you want to implement all Eloquent features, the software is no longer usable
@silas229 The field types isn't impossible, and so are many of the suggestions.
Of course, it is possible to implement them, but if you want to implement all Eloquent features, the software is no longer usable
I'd disagree, as long as it's designed properly.
I always use the $guarded = ['id'] instead of the $fillable array
when i add boolean field in "New eloquent model" i want to see 'boolean' validator in Form request, but i don't see it.
Hi please add search on selecting type, it just convenient if does, thank you
I just want to second the need for customised stubs, it would be great to use this plugin with the custom stubs.
It would be great if we could specify default values when creating models
After seeing the new form, what would be really amazing is a blueprint/visio style linker to create relationships
add $fillable array to model class
doesn't work with version 8.0.2.231 in my case.
The option add $casts array to model class
would be a usefull option.
@Muetze42 ID and updated/created fields aren't included in "fillable", so it seems it is empty in your case. Laravel Idea generates the "casts" property if it needs to cast some fields.
Please add functions as remove field or setting order fields with moving up and down.
If you leave a field empty, it will not be generated.
I am not the maintainer or even a contributor to the project, but I think it should be clear to everyone that it is impossible to integrate the entire Eloquent Framework into a single window. Therefore, we have to focus on core elements that are annoying to write by hand. Many features mentioned here are certainly practical, but impossible to implement in their entirety.
@silas229 The field types isn't impossible, and so are many of the suggestions.
right. setting order fields would be helpful. option to customize path of controllers - if i want to save some controllers in a specific sub directory (Such API) option to change table name with all references.
thank you
It would be nice to see the following things:
* The `date` column type, currently it's just the `dateTime` column type. * The ability to change the table name. * The ability to limit the length on fields, like `string("my_field", 4)`. * The ability to mark a field `unique`. * The ability to add comments on columns.
I'm missing the date
column type too!
It would be nice to see the following things:
* The `date` column type, currently it's just the `dateTime` column type. * The ability to change the table name. * The ability to limit the length on fields, like `string("my_field", 4)`. * The ability to mark a field `unique`. * The ability to add comments on columns.
I'm missing the
date
column type too!
What version are you using? i see "date" column
It would be nice to see the following things:
* The `date` column type, currently it's just the `dateTime` column type. * The ability to change the table name. * The ability to limit the length on fields, like `string("my_field", 4)`. * The ability to mark a field `unique`. * The ability to add comments on columns.
I'm missing the
date
column type too!What version are you using? i see "date" column
Oh! My bad! I was using an old version! Thanks very much @sneycampos ! Brazilians saving brazilians! =)
Nice to have:
none
, with values of index types (primary, unique, fulltext...)Fillable
checkboxThank You!
default value should be great for boolean fields for example (or for every field) because when I create a model with API and test it, omitting boolean fields throws an SQL error.
Also when I use Jetstream, I have to uncheck Register in Auth Service Provider option in Policy Settings otherwise it gives an error (Register Policy Error - There is no Auth Service Provider classes in the project) but the policy works perfectly fine (probably thanks to Policy Discovery)
Thanks for this great plugin by the way. It works great!
Just discovered this UI today, it's amazing!
I think a small dictionary for common PascalCase names could be added.
For example I have model called App\Models\GitHubRepository
, but the UI suggests git_hub_repository_id
when it should be github_repository_id
Adding common names like GitHub could a small but nice improvement.
I'm also missing an option to create a (Pest) test?
Planned features: