Transaction not edit, duplicate, delete etc button for Transferred

This commit is contained in:
Cüneyt Şentürk
2021-08-18 15:15:14 +03:00
parent de9a0603a7
commit ef00815557
2 changed files with 24 additions and 0 deletions

View File

@ -349,6 +349,16 @@ class Transaction extends Model
}
}
/**
* Check if the record is attached to a transfer.
*
* @return bool
*/
public function getHasTransferRelationAttribute()
{
return (bool) (optional($this->category)->id == optional($this->category)->transfer());
}
/**
* Get the title of type.
*