Files
freeu-project/app/Models/ProductPhotoDocuments.php
Ritikesh yadav c661166e1d first commit
2024-03-28 14:52:40 +05:30

27 lines
560 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ProductPhotoDocuments extends Model
{
use HasFactory;
protected $fillable = ['type', 'file_name', 'real_estates_id'];
const Photos = 0;
const Documents = 1;
// const path = 'https://jerichoalternatives.in/public/uploads/real_estate/photos/';
public function getFileNameAttribute($value)
{
if ($value)
return imagePath('public/uploads/real_estate/photos/') . $value;
}
}