use the new booted method
This commit is contained in:
parent
597633264d
commit
3a7277faa0
@ -28,14 +28,12 @@ abstract class Model extends Eloquent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "booting" method of the model.
|
* The "booted" method of the model.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function boot()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
parent::boot();
|
|
||||||
|
|
||||||
static::addGlobalScope(new Company);
|
static::addGlobalScope(new Company);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,14 +54,12 @@ class Transaction extends Model
|
|||||||
public $cloneable_relations = ['recurring'];
|
public $cloneable_relations = ['recurring'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "booting" method of the model.
|
* The "booted" method of the model.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function boot()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
parent::boot();
|
|
||||||
|
|
||||||
static::addGlobalScope(new Scope);
|
static::addGlobalScope(new Scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,14 +43,12 @@ class Contact extends Model
|
|||||||
public $sortable = ['name', 'email', 'phone', 'enabled'];
|
public $sortable = ['name', 'email', 'phone', 'enabled'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "booting" method of the model.
|
* The "booted" method of the model.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function boot()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
parent::boot();
|
|
||||||
|
|
||||||
static::addGlobalScope(new Scope);
|
static::addGlobalScope(new Scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,14 +73,12 @@ class Document extends Model
|
|||||||
public $cloneable_relations = ['items', 'recurring', 'totals'];
|
public $cloneable_relations = ['items', 'recurring', 'totals'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "booting" method of the model.
|
* The "booted" method of the model.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected static function boot()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
parent::boot();
|
|
||||||
|
|
||||||
static::addGlobalScope(new Scope);
|
static::addGlobalScope(new Scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,16 +17,12 @@ class Setting extends Eloquent
|
|||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attributes that should be mass-assignable.
|
* The "booted" method of the model.
|
||||||
*
|
*
|
||||||
* @var array
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['company_id', 'key', 'value'];
|
protected static function booted()
|
||||||
|
|
||||||
protected static function boot()
|
|
||||||
{
|
{
|
||||||
parent::boot();
|
|
||||||
|
|
||||||
static::addGlobalScope(new Company);
|
static::addGlobalScope(new Company);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user