2021-03-29 15:10:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Timeslot extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2021-03-29 15:10:07 +02:00
|
|
|
protected $fillable = [
|
2021-04-23 11:59:35 +02:00
|
|
|
'order_id', 'magasin_id'
|
2021-03-29 15:10:07 +02:00
|
|
|
];
|
|
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* BelongsTo order relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
2021-03-29 15:10:07 +02:00
|
|
|
public function order()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Order::class);
|
|
|
|
|
}
|
2021-04-23 11:59:35 +02:00
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* BelongsTo magasin relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
2021-04-23 11:59:35 +02:00
|
|
|
public function magasin()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Magasin::class);
|
|
|
|
|
}
|
2021-03-29 15:10:07 +02:00
|
|
|
}
|