mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 11:21:07 +03:30
feat: upgrade laravel version from 9 to 10
This commit is contained in:
+15
-15
@@ -9,7 +9,7 @@ use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable , HasApiTokens , HasRoles;
|
||||
use Notifiable, HasApiTokens, HasRoles;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -17,7 +17,7 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name' , 'email' , 'cell_number' , 'password' , 'status' , 'medical_center_id' , 'address' , 'gender'
|
||||
'name', 'email', 'cell_number', 'password', 'status', 'medical_center_id', 'address', 'gender'
|
||||
];
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
@@ -25,7 +25,7 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password' , 'remember_token' ,
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -34,56 +34,56 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime' ,
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function medical_center()
|
||||
{
|
||||
return $this->belongsTo( 'App\MedicalCenter' );
|
||||
return $this->belongsTo('App\MedicalCenter');
|
||||
}
|
||||
|
||||
public function test_results()
|
||||
{
|
||||
return $this->hasMany( 'App\TestResult' );
|
||||
return $this->hasMany('App\TestResult');
|
||||
}
|
||||
|
||||
public function test_types()
|
||||
{
|
||||
return $this->hasMany( 'App\TestType' );
|
||||
return $this->hasMany('App\TestType');
|
||||
}
|
||||
|
||||
public function findForPassport( $username )
|
||||
public function findForPassport($username)
|
||||
{
|
||||
return $this->where( 'cell_number' , $username )->where( 'status' , 'Active' )->first();
|
||||
return $this->where('cell_number', $username)->where('status', 'Active')->first();
|
||||
}
|
||||
|
||||
public function messagesSent()
|
||||
{
|
||||
return $this->hasMany( 'App\Message' , 'sender_user_id' );
|
||||
return $this->hasMany('App\Message', 'sender_user_id');
|
||||
}
|
||||
|
||||
public function messagesReceived()
|
||||
{
|
||||
return $this->hasMany( 'App\Message' , 'recipient_user_id' );
|
||||
return $this->hasMany('App\Message', 'recipient_user_id');
|
||||
}
|
||||
|
||||
public function packages()
|
||||
{
|
||||
return $this->hasMany( 'App\Package' );
|
||||
return $this->hasMany('App\Package');
|
||||
}
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany( 'App\Item' );
|
||||
return $this->hasMany('App\Item');
|
||||
}
|
||||
|
||||
public function labels()
|
||||
{
|
||||
return $this->hasMany( 'App\Label' );
|
||||
return $this->hasMany('App\Label');
|
||||
}
|
||||
|
||||
public function cycles()
|
||||
{
|
||||
return $this->hasMany( 'App\Cycle' );
|
||||
return $this->hasMany('App\Cycle');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user