l5scaffold
l5scaffold copied to clipboard
Typing mistakes check?
I ran the following command which has a double space before has_parent:
php artisan make:scaffold Categories --schema="id:increments, name:string, has_parent:integer:unsigned, count:integer:unsigned"
Unfortunately the double space is now taken into account in the database field name. From the migration file:
$table->integer(' has_parent')->unsigned();
This also happens in the controller and the views.
This is a user mistake, but it would be nice if there was some sort of check to see if the input contains a valid field name.