create my table with "php artisan migrate" and then "php artisan make: auth" in the database I created the table

1

As you can see, I created the "user" table in the appropriate singular and I want it to stay that way and in this way do all the CRUD. but laravel has a convention. that is, I would like to keep my table in the singular, the model in the same way.

    
asked by Rudy 24.08.2018 в 15:21
source

1 answer

1

Simply put in the user's model an attribute called $table to manually specify a name of the table

class User extends Model
{
    protected $table = 'user';
}

The user's default model is found in app\User.php

    
answered by 24.08.2018 / 15:37
source