25 lines
379 B
PHP
25 lines
379 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Cart extends Model
|
|
{
|
|
protected $fillable = [
|
|
'user_id',
|
|
'service_id',
|
|
'quantity',
|
|
];
|
|
|
|
public function service()
|
|
{
|
|
return $this->belongsTo(Service::class);
|
|
}
|
|
|
|
public function bookings()
|
|
{
|
|
return $this->hasMany(Booking::class);
|
|
}
|
|
}
|