moved company scope to trait
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models\Setting;
|
||||
|
||||
use App\Scopes\Company;
|
||||
use App\Traits\Tenants;
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
@ -23,16 +22,6 @@ class Setting extends Eloquent
|
||||
*/
|
||||
protected $fillable = ['company_id', 'key', 'value'];
|
||||
|
||||
/**
|
||||
* The "booted" method of the model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function booted()
|
||||
{
|
||||
static::addGlobalScope(new Company);
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Common\Company');
|
||||
|
Reference in New Issue
Block a user