first commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class RecipeImage extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'recipe_id',
|
||||
'image_path',
|
||||
'title',
|
||||
'description',
|
||||
'is_featured',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'recipe_id' => 'integer',
|
||||
'is_featured' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
|
||||
public function recipe(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Recipe::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user