'boolean', 'airline_id' => 'integer', 'amount' => 'float', 'type' => 'integer', 'multiplier' => 'bool', 'charge_to_user' => 'bool', ]; /** * Get the referring object */ public function getReference() { if (!$this->ref_class || !$this->ref_class_id) { return null; } if ($this->ref_class === __CLASS__) { return $this; } try { $klass = new $this->ref_class; return $klass->find($this->ref_class_id); } catch (\Exception $e) { return null; } } /** * Foreign Keys */ public function airline() { return $this->belongsTo(Airline::class, 'airline_id'); } }