I am using lumen 5.6 and implementing global scopes for query builder and using the boot method to call the scope class. Can someone have an idea why protected static function boot()
not working in lumen 5.6
Below is my code?
<?php
use App\Scopes\FilterSites;
use Illuminate\Database\Eloquent\Model;
class AccountTag extends Model {
var $useTable = 'tags_tbl';
var $primaryKey = 'tag_id';
protected static function boot()
{
parent::boot();
static::addGlobalScope(new FilterSites);
}