fixed #224
This commit is contained in:
@ -18,8 +18,8 @@ class Company implements Scope
|
||||
*/
|
||||
public function apply(Builder $builder, Model $model)
|
||||
{
|
||||
// Session not available in console
|
||||
if (App::runningInConsole()) {
|
||||
$company_id = session('company_id');
|
||||
if (empty($company_id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -37,8 +37,6 @@ class Company implements Scope
|
||||
}
|
||||
|
||||
// Apply company scope
|
||||
$company_id = session('company_id');
|
||||
|
||||
$builder->where($table . '.company_id', '=', $company_id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user