add transfer section

This commit is contained in:
mahdi purHosseini
2023-10-10 14:46:26 +03:30
parent 87770eb552
commit 53fac19916
13 changed files with 317 additions and 57 deletions
+10
View File
@@ -22,4 +22,14 @@
{
return $this->morphMany( 'App\Media' , 'model' );
}
public function transfers()
{
return $this->hasMany( 'App\Transfer' )->where( "status" ,"approved" );
}
public function transferActive()
{
return $this->hasOne( 'App\Transfer' )->where( "status" ,"approved" )->whereNull( "to_date" );
}
}