Support the ongoing development of Laravel.io →
Authentication
Last updated 1 year ago.
0

Paste the User model as well please

Last updated 1 year ago.
0

already paste

TorchSK said:

Paste the User model as well please

Last updated 1 year ago.
0

Try renaming the class 'user' to 'User'

Last updated 1 year ago.
0

I have tried, the result remains the same

TorchSK said:

Try renaming the class 'user' to 'User'

Last updated 1 year ago.
0

Add this to the User model

    public function getAuthIdentifier() {
    	return $this->getKey();
    }

    public function getAuthPassword() {
    	return $this->password;
    }

    public function getReminderEmail() {
    	return $this->email;
    }
Last updated 1 year ago.
0

same error Your alt text here

model

<?php

use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;

class User extends Eloquent implements UserInterface, RemindableInterface {

	use UserTrait, RemindableTrait;

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'user';

	/**
	 * The attributes excluded from the model's JSON form.
	 *
	 * @var array
	 */
	protected $hidden = array('password', 'remember_token');

public function getAuthIdentifier() {
        return $this->getKey();
    }


 public function getAuthPassword() {
        return $this->password;
    }

    public function getReminderUsername() {
        return $this->username;
    }
}
  
Last updated 1 year ago.
0

Run composer dump-autoload to see if there are any errors.
Don't you have some other class named 'User'?

Last updated 1 year ago.
0

already run the composer dump-autoload but nothing happened. for a class named 'User' only exists in the model only

Last updated 1 year ago.
0

Double check the class naming for migrations, helpers, seeds, etc...
Otherwise I am out of ideas :/ sorry

Edit
open Vendor/Composer/autoload_classmap.php and find the "User" class. What is the path to it?

Last updated 1 year ago.
0

I just don't have any idea on this I think i'm lost here :/ i upload packages on Git https://github.com/scarings/loginLaler

vendor

'User' => $baseDir . '/app/database/migrations/2014_07_26_101506_user.php',
    'UserController' => $baseDir . '/app/controllers/UserController.php',
Last updated 1 year ago.
0

And that is your problem. User class is set to the migration path.
Rename the migration class, run composer dump-autoload and everything should be fine

The line should be

'User' => $baseDir . '/app/models/User.php',
Last updated 1 year ago.
0

thank you for help me, solved

Last updated 1 year ago.
0

I know the topic is solved but, maybe a tip for your next migration files do like,

For example for creating a users table "create_users_table".

Last updated 1 year ago.
0

eriktisme said:

I know the topic is solved but, maybe a tip for your next migration files do like,

For example for creating a users table "create_users_table".

why ??

Last updated 1 year ago.
0

Thank you very much ^_^ @TorchSK

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

scarings scarings Joined 26 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.