I have model called Media and has custom attribute called url like below:
class Media extends BaseMedia
{
public function getUrlAttribute(): string
{
return $this->getUrl();
}
This attribute get url value from any place of the project well unless the report blade file and here is my code:
Get Method
function get_media_url_by_uuid(string $uuid)
{
return \App\Models\Media::where('uuid', $uuid)->first();
}
Access in the blade file:
get_media_url_by_uuid('282f0523-7ab2-4dcb-829e-d082868225a8')->getUrl()
The error:
Target class [filesystem] does not exist. (View: /home/project-path/resources/views/reports/sheets/sheet-report.blade.php)
Thanks in advance