Laravel SWAPI - The Star Wars API (swapi.dev) example.
Live demo (registration required): swapi.alexprojects.pl
- PHP version: >= 8
- Composer
- Node.js
-
git clone https://github.com/aleksandertabor/laravel-swapi YOURPROJECTNAME
-
cd YOURPROJECTNAME
-
Install dependencies:
composer install
npm install
-
cp .env.example .env
-
php artisan key:generate
-
Set your
.env
with credentials to your database server (DB_*
settings) and your domain config (APP_URL
). -
php artisan migrate
-
Fetch data from SWAPI with Artisan command
php artisan swapi:fetch-characters 50
-
Build frontend with
npm run production
for production. -
Run your server
php artisan serve
.
Using Docker?
Use docker-compose.yml
with Laravel Sail - installation
vendor/bin/phpunit tests
The application uses data from Swapi.dev - The Star Wars API.
Artisan command for Star Wars characters with their movies titles: php artisan swapi:fetch-characters {amount=50}
.
- Laravel 8
- Laravel Breeze as Starter kit (authentication features and frontend scaffolding - Inertia, Vue, Tailwind)
- Inertia.js 0.9+
- Vue.js v3
- Tailwind CSS 2+
- More tests ๐
- More options for Artisan command
- Split content of Vue pages for components
- Robust architecture (data management, validation)
- Handling more endpoints
- Fancy design
- ...