33 lines
853 B
PHP
33 lines
853 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
class Customers extends Authenticatable
|
|
{
|
|
use Notifiable;
|
|
|
|
protected $guard = 'customer';
|
|
|
|
public function recipes() {
|
|
return $this->belongsToMany('App\Models\Recipes', 'customer_recipe', 'customer_id', 'recipe_id');
|
|
}
|
|
|
|
public function products() {
|
|
return $this->belongsToMany('App\Models\Products', 'cart', 'customer_id', 'product_id');
|
|
}
|
|
|
|
public function forums() {
|
|
return $this->hasMany('App\Models\Forum', 'customer_id');
|
|
}
|
|
|
|
public function answers() {
|
|
return $this->hasMany('App\Models\ForumAnswers', 'customer_id');
|
|
}
|
|
|
|
public function departaimants() {
|
|
return $this->hasOne('App\Models\CustomersDepartaimants', 'customer_id');
|
|
}
|
|
}
|