FuelPHP Bin
Sign in
Public
PHP
Save
<?php namespace Cartalyst\Sentry\Users\Eloquent; use Eloquent; use Illuminate\Auth\UserInterface; use Illuminate\Auth\Reminders\RemindableInterface; class Admin extends \Cartalyst\Sentry\Users\Eloquent\User implements UserInterface, RemindableInterface { protected $table = 'admins'; protected $guarded = array( ); protected $fillable = array( ); public static $rules = array( ); /** * The login attribute. * * @var string */ protected static $loginAttribute = 'username'; // I only aded this because I use different login for users and admins /** * sentry methods */ public function groups(){ return $this->belongsToMany('Cartalyst\Sentry\Groups\Eloquent\Group', 'admins_groups'); } public function getAuthIdentifier(){ return $this->getKey(); } public function getAuthPassword(){ return $this->password; } public function getReminderEmail(){ return $this->email; } }