2021-03-16 17:48:35 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class FoodProduct extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
2021-03-23 14:51:37 +01:00
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'product_id',
|
|
|
|
|
];
|
|
|
|
|
|
2021-03-16 17:48:35 +01:00
|
|
|
public function product() {
|
2021-03-17 09:28:02 +01:00
|
|
|
return $this->belongsTo(Product::class);
|
2021-03-16 17:48:35 +01:00
|
|
|
}
|
|
|
|
|
}
|