commit 08.01
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// бронирование ĸлиентов
|
||||
// бронирование клиентов
|
||||
class Booking extends Model {
|
||||
use HasFactory;
|
||||
|
||||
@@ -20,4 +20,20 @@ class Booking extends Model {
|
||||
'cancelledby',
|
||||
'cancelreason'
|
||||
];
|
||||
|
||||
// списки броней
|
||||
public function service()
|
||||
{
|
||||
return $this->belongsTo(Services::class);
|
||||
}
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'client_id');
|
||||
}
|
||||
|
||||
public function employee()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'employee_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user