phpvms/app/Models/Expense.php
2018-03-01 16:20:13 -06:00

39 lines
646 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' => 'bool',
'type' => 'integer',
];
/**
* Foreign Keys
*/
public function airline()
{
return $this->belongsTo(Airline::class, 'airline_id');
}
}