Created
November 25, 2014 10:16
-
-
Save felnne/d693b5be76e5fea34bfa to your computer and use it in GitHub Desktop.
seeding problem - user model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 attributes excluded from the model's JSON form. | |
* | |
* @var array | |
*/ | |
protected $hidden = array('password', 'remember_token'); | |
/** | |
* To protect against mass assignment attacks white-list some variables | |
* | |
* @var array | |
*/ | |
protected $fillable = array('username', 'email', 'password'); | |
public function setPasswordAttribute($password) | |
{ | |
$this->attributes['password'] = Hash::make($password); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment