Post fares/expenses on PIREP to Airline journal #130

This commit is contained in:
Nabeel Shahzad
2018-03-01 16:20:13 -06:00
parent f1b9ea94dc
commit 2c52a2f7e6
22 changed files with 625 additions and 85 deletions

View File

@@ -2,12 +2,16 @@
namespace App\Models;
use App\Models\Traits\JournalTrait;
/**
* Class Airline
* @package App\Models
*/
class Airline extends BaseModel
{
use JournalTrait;
public $table = 'airlines';
public $fillable = [
@@ -68,5 +72,12 @@ class Airline extends BaseModel
$model->icao = strtoupper($model->icao);
}
});
/**
* Make sure a new journal object is created
*/
static::created(function(Airline $model) {
$model->initJournal(config('phpvms.currency'));
});
}
}