From 248a8d1488cc5bd83c397df699381f1c7b2ca202 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Tue, 12 Dec 2017 16:58:27 -0600 Subject: [PATCH] Add more API resources; user bid management and tests #35 #36 --- .idea/inspectionProfiles/Project_Default.xml | 1 + app/Facades/Utils.php | 11 +- app/Http/Controllers/Api/FlightController.php | 5 + app/Http/Controllers/Api/UserController.php | 55 ++++++++++ app/Http/Middleware/ApiAuth.php | 13 +-- app/Http/Resources/Aircraft.php | 13 +++ app/Http/Resources/Airline.php | 23 ++++ app/Http/Resources/Airport.php | 6 - app/Http/Resources/Flight.php | 12 +- app/Http/Resources/Rank.php | 26 +++++ app/Http/Resources/Subfleet.php | 24 ++++ app/Http/Resources/User.php | 31 ++++++ app/Http/Resources/UserBid.php | 20 ++++ app/Models/Aircraft.php | 41 +++---- app/Models/Flight.php | 10 +- app/Models/Subfleet.php | 5 + app/Models/User.php | 103 +++++------------- app/Services/FlightService.php | 79 ++++++++++++++ app/Services/UserService.php | 46 ++++---- .../2017_06_08_0000_create_users_table.php | 4 +- ...017_12_10_014930_create_settings_table.php | 2 +- database/seeds/dev.yml | 3 + resources/views/admin/pireps/fields.blade.php | 2 +- .../views/layouts/default/home.blade.php | 2 +- routes/api.php | 10 +- tests/FlightTest.php | 76 ++++++++++++- tests/data/base.yml | 13 ++- 27 files changed, 470 insertions(+), 166 deletions(-) create mode 100644 app/Http/Controllers/Api/UserController.php create mode 100644 app/Http/Resources/Aircraft.php create mode 100644 app/Http/Resources/Airline.php create mode 100644 app/Http/Resources/Rank.php create mode 100644 app/Http/Resources/Subfleet.php create mode 100644 app/Http/Resources/User.php create mode 100644 app/Http/Resources/UserBid.php create mode 100644 app/Services/FlightService.php diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 1c6d6936..6fb884f4 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -26,6 +26,7 @@