this makes possible adding extra attributes to models

This commit is contained in:
Sevan Nerse
2021-02-26 17:16:48 +03:00
parent 962e626c9e
commit 5878c96c3a
16 changed files with 54 additions and 99 deletions

View File

@ -21,10 +21,23 @@ abstract class Model extends Eloquent
'enabled' => 'boolean',
];
public $extras = [
public $allAttributes = [
//
];
/**
* Create a new Eloquent model instance.
*
* @param array $attributes
* @return void
*/
public function __construct(array $attributes = [])
{
$this->allAttributes = $attributes;
parent::__construct($attributes);
}
public static function observe($classes)
{
parent::observe($classes);