| 1 | <?php |
||
| 23 | class Asset extends Model |
||
| 24 | { |
||
| 25 | use Localable; |
||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | protected $table = 'assets'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | protected $fillable = [ |
||
| 35 | 'contentful_id', |
||
| 36 | 'country', |
||
| 37 | 'locale', |
||
| 38 | 'title', |
||
| 39 | 'description', |
||
| 40 | 'url', |
||
| 41 | 'file_name', |
||
| 42 | 'content_type', |
||
| 43 | 'size', |
||
| 44 | 'width', |
||
| 45 | 'height', |
||
| 46 | ]; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | protected $casts = [ |
||
| 52 | 'size' => 'integer', |
||
| 53 | 'width' => 'integer', |
||
| 54 | 'height' => 'integer', |
||
| 55 | ]; |
||
| 56 | |||
| 57 | |||
| 58 | /** |
||
| 59 | * Return asset URL. |
||
| 60 | * |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function getUrl() |
||
| 67 | |||
| 68 | } |
||
| 69 |