#21 basic listings/model configs

This commit is contained in:
Nabeel Shahzad
2017-07-02 21:25:48 -05:00
parent ddc2ed4d89
commit 9b6f9e9586
6 changed files with 52 additions and 21 deletions

View File

@@ -52,6 +52,11 @@ class User extends Authenticatable
'password', 'remember_token',
];
public function pilot_id()
{
return $this->airline->code . str_pad($this->id, 3, '0', STR_PAD_LEFT);
}
/**
* Foreign Keys
*/