laravel without global scope

41

public function boot()
    {
        parent::boot();

        Route::bind('project', function($id) {
            return \App\Project::withoutGlobalScopes()->findOrFail($id);
        });
    }
protected static function boot()
    {
        parent::boot();
  
        static::addGlobalScope(new ArchiveScope);
    }

Comments

Submit
0 Comments