MIF_E31221305/TA_API/app/Models/TailorGallery.php

32 lines
570 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TailorGallery extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'photo',
'title',
'description',
'category'
];
protected $casts = [
'id' => 'integer',
'user_id' => 'integer'
];
/**
* Get the tailor that owns the gallery item
*/
public function tailor()
{
return $this->belongsTo(User::class, 'user_id');
}
}