public function scopeActive($query)
    {
        return $this->scopeActiveOn($query,
                AcademicPeriod::current()->get()->first()->id);
    }
public function scopeActive($query)
    {
        return $this->scopeActiveOn($query,
                AcademicPeriod::current()->get()->first()->id);
    }
public function scopeActive ( $ query ) { return $ this -> scopeActiveOn ( $ query , AcademicPeriod :: current ( ) -> get ( ) -> first ( ) -> id ) ; }
Only teachers active for current period.

@param \Illuminate\Database\Eloquent\Builder $query
@return mixed
Only teachers active for current period .