mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:11:07 +03:30
Come BackEnd
This commit is contained in:
+21
-2
@@ -5,10 +5,11 @@ namespace App;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Laravel\Passport\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
use Notifiable, HasApiTokens;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -16,7 +17,7 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
'name', 'email', 'password','cell_number','status','medical_center_id'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -36,4 +37,22 @@ class User extends Authenticatable
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function medicalcenter()
|
||||
{
|
||||
return $this->belongsTo('App\MedicalCenter');
|
||||
}
|
||||
public function testresults()
|
||||
{
|
||||
return $this->hasMany('App\TestResult');
|
||||
}
|
||||
public function testtypes()
|
||||
{
|
||||
return $this->hasMany('App\TestType');
|
||||
}
|
||||
|
||||
public function findForPassport($username)
|
||||
{
|
||||
return $this->where('cell_number', $username)->first();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user