22 lines
483 B
PHP
22 lines
483 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\UuidPrimaryKey;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* @method static find(mixed $restaurant)
|
|
* @property mixed id
|
|
*/
|
|
class Restaurante extends Model {
|
|
use UuidPrimaryKey, SoftDeletes;
|
|
|
|
protected $table = 'restaurantes';
|
|
|
|
public function usuarios() {
|
|
return $this->belongsToMany(Usuario::class, 'usuarios_restaurantes', 'restaurante_id', 'usuario_id');
|
|
}
|
|
}
|