Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
app
/
Models
/
Filename :
ProductImage.php
back
Copy
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Casts\Attribute; use Config; class ProductImage extends Model { protected $table = 'product_images'; protected $primaryKey = 'product_image_id'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'product_id', 'image_name', 'updated_at' ]; protected function imageName(): Attribute { return Attribute::make( get: fn (string $value) => Config::get('constants.app.api-product-image-url').$value, ); } }