mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixed Laravel 5.7 compatibility issue re: boot() method
This was causing the error: Undefined index: App\Models\CustomField (View: /Users/snipe/Sites/snipe-it/snipe-it/resources/views/hardware/index.blade.php) and pointed to the Eloquent model library method: ``` protected function initializeTraits() { foreach (static::$traitInitializers[static::class] as $method) { $this->{$method}(); } } ``` Thanks to https://github.com/laravel/framework/issues/25455 for the clue.
This commit is contained in:
parent
60459d07ce
commit
b80b91514d
|
@ -87,6 +87,7 @@ class CustomField extends Model
|
|||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
self::created(function ($custom_field) {
|
||||
|
||||
// Column already exists on the assets table - nothing to do here.
|
||||
|
|
Loading…
Reference in a new issue