12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Repositories\Models\Base;
- use App\Repositories\Models\Model;
- class Banner extends Model
- {
- /**
- * @var string
- */
- protected $table = 'base_banners';
- protected $guarded = [];
- /**
- * The attributes excluded from the model's JSON form.
- *
- * @var array
- */
- protected $hidden = [];
- public function getUrlAttribute()
- {
- if (array_key_exists('path', $this->attributes)) return path_to_url($this->attributes['path']);
- return '';
- }
- }
|