27 lines
560 B
PHP
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;
|
|
}
|
|
|
|
}
|