This is a sample Laravel project with Laravel API consumed by a client made with Vue.js
Clone the repository
git clone https://github.com/gradosevic/bet-360.git
Copy .env.example to .env and update (at least) APP_URL and DB_* with your own values. The API can be consumed by any other REST clients.
Install dependencies:
composer install
npm i
Build
npm run prod
Run DB migrations
php artisan migrate
Add test data
php artisan db:seed
Create REST API clients
php artisan passport:install
Go to /login to log in with an existing user or /register to register a new user.
Demo user (from the test data):
demo@demo.com | demo
Run tests with
composer test
To consume API by an external client, please log in to app and go to API tab. Click on Create New Token to generate a new API token.
Copy token and use it with your REST client. Add "Bearer {API_TOKEN}" to the header of your requests.