phpvms/app/Models/Expense.php
2018-02-26 15:16:12 -06:00

39 lines
649 B
PHP

<?php
namespace App\Models;
/**
* Class Expense
* @package App\Models
*/
class Expense extends BaseModel
{
public $table = 'expenses';
public $fillable = [
'airline_id',
'name',
'amount',
'type',
'multiplier',
'active',
];
public static $rules = [
'active' => 'boolean',
'airline_id' => 'integer',
'amount' => 'float',
'multiplier' => 'integer',
'type' => 'integer',
];
/**
* Foreign Keys
*/
public function airline()
{
return $this->belongsTo(Airline::class, 'airline_id');
}
}