Code improvements
This commit is contained in:
@@ -31,7 +31,7 @@ abstract class CommonController {
|
||||
protected AdminTenantRepository $adminTenants;
|
||||
|
||||
public function __construct() {
|
||||
$this->tenant = app('tenant');
|
||||
$this->tenant = currentTenant();
|
||||
$this->users = new UserRepository();
|
||||
$this->costUnits = new CostUnitRepository();
|
||||
$this->pageTexts = new PageTextRepository();
|
||||
|
||||
@@ -9,6 +9,6 @@ class SiteScope implements Scope
|
||||
{
|
||||
public function apply(Builder $builder, Model $model): void
|
||||
{
|
||||
$builder->where($model->getTable() . '.tenant', app('tenant')->slug);
|
||||
$builder->where($model->getTable() . '.tenant', currentTenant()->slug);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user