Edit File: StoreMenu.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class StoreMenu extends Model { use HasFactory; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = ['image' , 'store_id']; public function store(){ return $this->belongsTo(Store::class); } public function getImagePathAttribute() { return asset('assets/uploads/menusGoogle/' . $this->image); } }
Back to File Manager