init
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Airline
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $country
|
||||
* @property string $mobile
|
||||
* @property int $status
|
||||
* @property int $created_at
|
||||
* @property int $updated_at
|
||||
*
|
||||
* @property Collection|Flight[] $flights
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Airline extends Model
|
||||
{
|
||||
protected $table = 'airlines';
|
||||
|
||||
protected $casts = [
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'country',
|
||||
'mobile',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function flights()
|
||||
{
|
||||
return $this->hasMany(Flight::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user