Created
February 29, 2020 15:21
-
-
Save abishekrsrikaanth/1229b079e78bec7ee8d48a3ff9243f1d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
namespace App\Models; | |
class User extends Authenticatable | |
{ | |
use Notifiable, HasRoles, Billable; | |
public $table = 'users'; | |
protected $fillable = [ | |
'name', | |
'email', | |
'password', | |
]; | |
protected $hidden = [ | |
'password', | |
'remember_token', | |
]; | |
public function scopeCustomers($query) | |
{ | |
return $query->role('CUSTOMER'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment