44 lines
920 B
PHP
44 lines
920 B
PHP
<?php
|
|
|
|
namespace Modules\Testimonial\app\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Modules\Testimonial\Database\factories\TestimonialFactory;
|
|
|
|
class Testimonial extends Model
|
|
{
|
|
const FILE_PATH = 'uploads/testimonials/';
|
|
|
|
// use HasFactory;
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'uuid',
|
|
'name',
|
|
'designation',
|
|
'ordering',
|
|
'statement',
|
|
'image',
|
|
'image_path',
|
|
'status',
|
|
'link',
|
|
];
|
|
|
|
|
|
protected static function newFactory(): TestimonialFactory
|
|
{
|
|
//return TestimonialFactory::new();
|
|
}
|
|
|
|
public function getFullImageAttribute()
|
|
{
|
|
return $this->image ? asset('storage/' . Self::FILE_PATH . $this->image) : null;
|
|
}
|
|
|
|
}
|