pai-sklep/app/Models/Image.php

22 lines
378 B
PHP
Raw Permalink Normal View History

2021-11-14 14:51:49 +01:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class Image extends Model
{
use HasFactory;
use HasUUID;
public $primaryKey = "uuid";
protected $fillable = [];
public function URL()
{
2021-11-14 20:44:10 +01:00
return Storage::url($this->path);
2021-11-14 14:51:49 +01:00
}
}