mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 13:51:08 +03:30
add transfer section
This commit is contained in:
+44
-39
@@ -2,31 +2,30 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Passport\HasApiTokens;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable, HasApiTokens, HasRoles;
|
||||
use Notifiable , HasApiTokens , HasRoles;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password','status','medical_center_id','address', 'gender'
|
||||
];
|
||||
protected $fillable = [
|
||||
'name' , 'email' , 'password' , 'status' , 'medical_center_id' , 'address' , 'gender'
|
||||
];
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
'password' , 'remember_token' ,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -35,50 +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)
|
||||
{
|
||||
return $this->where('cell_number', $username)->where('status', 'Active')->first();
|
||||
}
|
||||
public function findForPassport( $username )
|
||||
{
|
||||
return $this->where( 'cell_number' , $username )->where( 'status' , 'Active' )->first();
|
||||
}
|
||||
|
||||
public function messagesSent()
|
||||
{
|
||||
return $this->hasMany('App\Message', 'sender_user_id');
|
||||
}
|
||||
public function messagesSent()
|
||||
{
|
||||
return $this->hasMany( 'App\Message' , 'sender_user_id' );
|
||||
}
|
||||
|
||||
public function messagesReceived()
|
||||
{
|
||||
return $this->hasMany('App\Message', 'recipient_user_id');
|
||||
}
|
||||
public function packages()
|
||||
{
|
||||
return $this->hasMany('App\Package');
|
||||
}
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany('App\Item');
|
||||
}
|
||||
public function labels()
|
||||
{
|
||||
return $this->hasMany('App\Label');
|
||||
}
|
||||
public function cycles()
|
||||
{
|
||||
return $this->hasMany('App\Cycle');
|
||||
}
|
||||
public function messagesReceived()
|
||||
{
|
||||
return $this->hasMany( 'App\Message' , 'recipient_user_id' );
|
||||
}
|
||||
|
||||
public function packages()
|
||||
{
|
||||
return $this->hasMany( 'App\Package' );
|
||||
}
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany( 'App\Item' );
|
||||
}
|
||||
|
||||
public function labels()
|
||||
{
|
||||
return $this->hasMany( 'App\Label' );
|
||||
}
|
||||
|
||||
public function cycles()
|
||||
{
|
||||
return $this->hasMany( 'App\Cycle' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user