From a5cf13017676f49da621ce981b7f04a69b87f235 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Tue, 12 Dec 2017 13:59:05 -0600 Subject: [PATCH] add a has_bid column to the flights table --- app/Models/Flight.php | 63 +++++++++---------- ...2017_06_17_214650_create_flight_tables.php | 1 + 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/Models/Flight.php b/app/Models/Flight.php index cbe99dd5..150477cc 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -20,50 +20,49 @@ class Flight extends Model protected $dates = ['deleted_at']; - public $fillable - = [ - 'airline_id', - 'flight_number', - 'route_code', - 'route_leg', - 'dpt_airport_id', - 'arr_airport_id', - 'alt_airport_id', - 'route', - 'dpt_time', - 'arr_time', - 'notes', - 'active', - ]; + public $fillable = [ + 'airline_id', + 'flight_number', + 'route_code', + 'route_leg', + 'dpt_airport_id', + 'arr_airport_id', + 'alt_airport_id', + 'route', + 'dpt_time', + 'arr_time', + 'notes', + 'has_bid', + 'active', + ]; /** * The attributes that should be casted to native types. * * @var array */ - protected $casts - = [ - 'flight_number' => 'integer', - 'route_code' => 'string', - 'route_leg' => 'string', - 'route' => 'string', - 'dpt_time' => 'string', - 'arr_time' => 'string', - 'notes' => 'string', - 'active' => 'boolean', - ]; + protected $casts = [ + 'flight_number' => 'integer', + 'route_code' => 'string', + 'route_leg' => 'string', + 'route' => 'string', + 'dpt_time' => 'string', + 'arr_time' => 'string', + 'notes' => 'string', + 'has_bid' => 'boolean', + 'active' => 'boolean', + ]; /** * Validation rules * * @var array */ - public static $rules - = [ - 'flight_number' => 'required', - 'dpt_airport_id' => 'required', - 'arr_airport_id' => 'required', - ]; + public static $rules = [ + 'flight_number' => 'required', + 'dpt_airport_id' => 'required', + 'arr_airport_id' => 'required', + ]; /** * Relationship diff --git a/database/migrations/2017_06_17_214650_create_flight_tables.php b/database/migrations/2017_06_17_214650_create_flight_tables.php index 5f050246..28e44652 100644 --- a/database/migrations/2017_06_17_214650_create_flight_tables.php +++ b/database/migrations/2017_06_17_214650_create_flight_tables.php @@ -27,6 +27,7 @@ class CreateFlightTables extends Migration $table->string('arr_time', 10)->nullable(); $table->unsignedDecimal('flight_time', 19)->nullable(); $table->text('notes')->nullable(); + $table->boolean('has_bid')->default(false); $table->boolean('active')->default(true); $table->timestamps();