Out of curiosity / frustration, made a new laravel copy,
makes a migration with the following:
public function up()
{
Schema::create('artists', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
Since it automagically ( :-( ) renames model Artist to artists, i can imagine someplace in the code where this happens as well with my inserts, even though i renamed the migration files... what is my next step, where can i read a bit more about this?
It doesn't rename anything. If you don't set the $table
property on the model it will use the plural form of the class name for the table name of the model.
This is in the eloquent docs.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community