You also need to open up app/config/auth.php
and change 'table'
item with your table name.
See https://github.com/laravel/laravel/blob/master/app/config/auth.php
diego1araujo said:
You also need to open up
app/config/auth.php
and change'table'
item with your table name.See https://github.com/laravel/laravel/blob/master/app/config/auth.php
but m not using tht for authcation,why i need to change
and also this error occurs too when i created a function abc and called it like this User:abc();
BadMethodCallException Call to undefined method Illuminate\Database\Query\Builder::abc()
As I told you, It keep using 'users'
table.. so maybe changing auth.php file might works
diego1araujo said:
As I told you, It keep using
'users'
table.. so maybe changing auth.php file might works
bro thats not working but when i try to use auth::attempt function to login the users its shows me error that users tables does not exist ,after that i changed table name in auth.php in config still its not working,,what to do now ?? what this framework is for ,to create problem for its users ??
I've made a test. I created a new project and changed only User Model
:
protected $table = 'my_user_table';
So, I added some data to this table and retrieve results:
dd(User::all()->toArray());
It was successful.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community