jwt session is available in one hour
The Laravel framework is open-sourced software licensed under the MIT license.
- Jalankan Command
composer install --ignore-platform-reqs
-
Setelah itu ganti host DB dengan 'localhost'
-
Buat database dengan nama 'laravel_sail'
-
Lakukan migrasi database dan seed data untuk stok mobil dan motor
php artisan:migrate fresh --seed
- Lakukan Testing menggunakan
atau
,/vendor/bin/sail artisan test
php artisan test
- Jalankan project seperti biasa setelah test
php artisan serve
- Jalankan Command
composer install --ignore-platform-reqs
-
Setelah itu ganti host DB dengan 'mongo'
-
Buat database dengan nama 'laravel_sail'
-
Jalankan container docker
- Untuk Windows
.\vendor\bin\sail up
- Untuk OS berbasis *NIX
./vendor/bin/sail up
- Untuk Windows
-
Setelah menjalankan command diatas. Project laravel sudah berjalan dan diakses melalui localhost seperti biasa
untuk port project laravel dan database dll dapat dilihat di file docker-Compose.yml di bagian PORT untuk setiap service -
Setelah itu jalankan migrasi
- Untuk Windows
.\vendor\bin\sail php artisan migrate:fresh --seed
- Untuk OS berbasis *NIX
./vendor/bin/sail php artisan migrate:fresh --seed
- Untuk Windows
POST : http://localhost:80/api/auth/login
Login
{
"email":"[email protected]",
"password":"password"
}
List Kendaraan
GET : http://localhost:80/api/auth/kendaraan
List History ketika ingin melihat history transaksi dengan tipe kendaraan mobil ketika salah menulis url maka akan Get semua history transaksi
GET : http://localhost:80/api/auth/history?tipe_kendaraan=mobil
Get semua history
GET : http://localhost:80/api/auth/history
Get history dengan id transaksi
GET : http://localhost:80/api/auth/history?id=id transaksi
Transaksi
POST : http://localhost:80/api/auth/transaksi
ganti id_item sesuai dengan id kendaraan
{
"nama":"Deva",
"id_item":"62c8be4c96b06bdecb0a0927",
"stok_item":1
}