hasib32 / rest-api-with-lumen

Rest API boilerplate for Lumen micro-framework.
486 stars 144 forks source link

Rename table user #54

Open yruama opened 6 years ago

yruama commented 6 years ago

Is it possible to rename the table users ? I already have a user table for my admin panel.

Thanks!

BrunoPansani commented 6 years ago

Yes, it is. As per Laravel docs, you should just add a protected variable called $table and set it to the name of your table on the user model.


class User extends Model
{
    protected $connection = 'myDB'; // If you want the specify your DB connection..

    protected $table = 'my_users_table'; // Specifying the table

....
}