HI i searched Google but did not find anything about this and i never had this error before in Laravel.
I did not modify my user model just added a hasOne relation.
And i keep getting this error what i am not able to solve for 2 hours now
Trait 'Illuminate\Auth\UserTrait' not found
I did not touch the model
User 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 = 'users';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
public function metadata()
{
return $this->hasOne('Metadata');
}
}
Could someone give me a hand?
Sounds like you need to upgrade to Laravel v4.2.
The Illuminate\Auth\UserTrait class wasn't introduced until v4.2. Check the change log on github.
Check the upgrade guides if you do upgrade as there were a couple of other changes that may break your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With