public static function boot() { parent::boot(); Vehicle::creating(function ($vehicle) { $vehicle->company_id = $vehicle->company_id ?: Auth::user()['company_id']; }); }