class Cyclist extends User
{
protected $table = 'users';
protected static function boot()
{
parent::boot();
static::addGlobalScope('cyclist', function (Builder $builder) {
$builder->where('is_active', 'ok');
});
}
Now when i do
$l = Cyclist::query()
->join('cyclist_table','cyclist_table.user_id','=','users.id')
->first();
dd($l);
Tinkerwell doesnt return anything. What am i missing in the child class?
6