Skip to content

christian1dk/Transport-Units

Repository files navigation

Transport-Units

Setup & start

  • cp .env.example .env
  • docker-compose up --build
  • docker-compose exec app composer install
  • docker-compose exec app php artisan migrate
  • docker-compose exec app php artisan db:seed
  • docker-compose exec app php artisan serve --host=0.0.0.0 --port=8000

Run test

  • docker-compose exec app php artisan test

Build

  • composer create-project laravel/laravel Transport-Units

  • docker-compose up --build

  • php artisan make:migration create_transport_units_table

  • docker-compose exec app php artisan migrate

  • docker-compose exec app php artisan make:model TransportUnit

  • docker-compose exec app php artisan make:controller TransportUnitController

  • docker-compose exec app php artisan make:factory TransportUnitFactory --model=TransportUnit

  • docker-compose exec app php artisan make:seeder TransportUnitSeeder

  • docker-compose exec app php artisan db:seed

  • docker-compose exec app php artisan make:test TransportUnitTest

  • docker-compose exec app composer require laravel/ui:^3.0

  • docker-compose exec app php artisan ui vue

  • docker-compose exec app npm install

  • docker-compose exec app npm install vue-loader@^15.9.8 --save-dev --legacy-peer-deps

  • docker-compose exec app npm run dev

Test

  • curl -X GET localhost:8000/api/transport-units
  • curl -X GET localhost:8000/api/transport-units/search?search=your-search-term
  • curl -X POST localhost:8000/api/transport-units -H "Content-Type: application/json" -d '{"name": "New Truck", "type": "truck"}'
  • curl -X POST localhost:8000/api/transport-units -H "Content-Type: application/json" -d '{"name": "New Trailer", "type": "trailer"}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published