diff --git a/Makefile b/Makefile index 629e7bb0..b4fb0bfc 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ install: db reset: @rm database/testing.sqlite @php artisan optimize + @php artisan route:clear @php artisan config:clear @sqlite3 database/testing.sqlite "" @php artisan migrate:refresh --seed diff --git a/app/Models/Aircraft.php b/app/Models/Aircraft.php index 0f2983b2..0a96d77f 100644 --- a/app/Models/Aircraft.php +++ b/app/Models/Aircraft.php @@ -24,8 +24,8 @@ class Aircraft extends Model 'aircraft_class_id', 'icao', 'name', - 'full_name', 'registration', + 'tail_number', 'active', ]; @@ -38,7 +38,6 @@ class Aircraft extends Model = [ 'icao' => 'string', 'name' => 'string', - 'full_name' => 'string', 'registration' => 'string', 'active' => 'boolean', ]; @@ -50,11 +49,9 @@ class Aircraft extends Model */ public static $rules = [ - 'icao' => 'required|max:4', + 'icao' => 'required|max:5', 'name' => 'required', - 'full_name' => 'required', - 'registration' => 'required', - 'active' => 'default:1', + 'active' => '', ]; /** diff --git a/app/Models/Fare.php b/app/Models/Fare.php index 2526887f..54685c69 100644 --- a/app/Models/Fare.php +++ b/app/Models/Fare.php @@ -53,7 +53,6 @@ class Fare extends Model = [ 'code' => 'required', 'name' => 'required', - 'cost' => 'default:0.0', ]; public function aircraft() { diff --git a/composer.json b/composer.json index 0f1551c1..074a2475 100755 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", - "phpunit/phpunit": "~5.0", + "phpunit/phpunit": "~5.7", "symfony/css-selector": "3.1.*", "symfony/dom-crawler": "3.1.*" }, diff --git a/composer.lock b/composer.lock index a566ef46..fe0b73f8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "d6ded0be19cfd6b1fb37f7eeb6baadb4", + "content-hash": "e5d6a4a09e901eae8c895fe8c97979cc", "packages": [ { "name": "barryvdh/laravel-ide-helper", diff --git a/database/migrations/2017_06_09_010621_create_aircrafts_table.php b/database/migrations/2017_06_09_010621_create_aircrafts_table.php index 3825d777..d16dee6d 100644 --- a/database/migrations/2017_06_09_010621_create_aircrafts_table.php +++ b/database/migrations/2017_06_09_010621_create_aircrafts_table.php @@ -12,7 +12,6 @@ class CreateAircraftsTable extends Migration $table->integer('aircraft_class_id')->unsigned()->nullable(); $table->string('icao'); $table->string('name'); - $table->string('full_name')->nullable(); $table->string('registration')->nullable(); $table->string('tail_number')->nullable(); $table->string('cargo_capacity')->nullable(); diff --git a/resources/views/admin/aircraft/fields.blade.php b/resources/views/admin/aircraft/fields.blade.php index f9ee41f0..c3ebd5d6 100644 --- a/resources/views/admin/aircraft/fields.blade.php +++ b/resources/views/admin/aircraft/fields.blade.php @@ -1,6 +1,6 @@
{!! $aircraft->id !!}
-{!! $aircraft->icao !!}
{!! $aircraft->name !!}
{!! $aircraft->full_name !!}
-{!! $aircraft->registration !!}
{!! $aircraft->active !!}
{!! $aircraft->created_at !!}
{!! $aircraft->updated_at !!}