Hi gnardella,
Try to use php artisan generators (Way Generators) so you can save the name mistakes creating models.
php artisan generate:model
You can specify the --path, --templatePath and modelName as parameters to the Artisan CLI function.
Hope it helps you.
codeATbusiness said:
Hi gnardella,
Try to use php artisan generators (Way Generators) so you can save the name mistakes creating models.
php artisan generate:model
You can specify the --path, --templatePath and modelName as parameters to the Artisan CLI function.
Hope it helps you.
I tried
php artisan genrate:model LocationsTipo
but the result is the same. After if I change LocantionsTipo to Locationstipo all works.
Hi, i think you can add the following line below of your class beginning:
class LocationsTipo extends Eloquent{
public static $snakeAttributes = false; //if false enable to you to use camelcase notation
}
Hope it helps you.
Why do you try to rename the model to LocationType?. The model name needs to be singular and if you use a table you could use LocationTypes as a database table name.
Hope it helps you.
You are welcome.
By the way, you could tell to your model the table to use if you don't want to limit to pluralize options of Laravel.
class LocationType extends Eloquent{
protecte $table = "LocationTypes";
//the other properties and methods
}
Hope helps you.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community