You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
401 B

<?php
namespace App\Models;
use App\Scopes\RestaurantScope;
use Illuminate\Database\Eloquent\Model;
class MailConfig extends Model
{
public function restaurant()
{
return $this->belongsTo(Restaurant::class);
}
protected static function booted()
{
if(auth('vendor')->check())
{
static::addGlobalScope(new RestaurantScope);
}
}
}