Skip to content

Instantly share code, notes, and snippets.

@mohsenuss91
Created August 19, 2017 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohsenuss91/8e3e68d43490795ac9c6f97a2bd30263 to your computer and use it in GitHub Desktop.
Save mohsenuss91/8e3e68d43490795ac9c6f97a2bd30263 to your computer and use it in GitHub Desktop.
User Model to login
<?php
namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
class User extends Model implements AuthenticatableContract
{
use Authenticatable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name', 'email', 'password'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment