Skip to content

Instantly share code, notes, and snippets.

@abishekrsrikaanth
Created February 29, 2020 15:21
Show Gist options
  • Save abishekrsrikaanth/1229b079e78bec7ee8d48a3ff9243f1d to your computer and use it in GitHub Desktop.
Save abishekrsrikaanth/1229b079e78bec7ee8d48a3ff9243f1d to your computer and use it in GitHub Desktop.
<?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