You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
463 B
PHP
28 lines
463 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
|
|
class Account extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'bank_name',
|
|
'holder_name',
|
|
'account_number',
|
|
'logo',
|
|
];
|
|
|
|
protected $appends = [
|
|
'logo_url',
|
|
];
|
|
|
|
protected function logoUrl(): Attribute
|
|
{
|
|
return Attribute::make(get: function () {
|
|
return asset($this->logo);
|
|
});
|
|
}
|
|
}
|