- php >= 8.0
- composer >= 2
- nginx
- php-fpm >= 8.0
- Authentication
- API
- Token authentication
- API Resources
- Versioning
- Blade
- Broadcasting
- Cache
- Email Verification
- Filesystem
- Helpers
- Horizon
- Localization
- Migrations
- Policies
- Providers
- Requests
- Seeding & Factories
- Testing
- Homestead
Beside Laravel, this project uses other tools like:
- Bootstrap 4
- PHP-CS-Fixer
- Travis CI
- Font Awesome
- Vue.js
- axios
- Redis
- spatie/laravel-medialibrary
- Many more to discover.
You can find some screenshots of the application on : https://imgur.com/a/Jbnwj
Setting up your development environment on your local machine :
$ git clone https://github.com/guillaumebriday/laravel-blog.git
$ cd laravel-blog
$ cp .env.example .env
$ composer install
All following commands must be run inside the VM:
$ cd code
$ yarn install
$ artisan key:generate
$ artisan horizon:install
$ artisan telescope:install
$ artisan storage:link
You need to run the migrations with the seeds :
$ artisan migrate --seed
And then, compile the assets :
$ yarn dev # or yarn watch
Starting job for newsletter :
$ artisan tinker
> PrepareNewsletterSubscriptionEmail::dispatch();
Seeding the database :
$ artisan db:seed
Running tests :
$ ./vendor/bin/phpunit --cache-result --order-by=defects --stop-on-defect
Running php-cs-fixer :
$ ./vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --dry-run --diff
Generating backup :
$ artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"
$ artisan backup:run
Generating fake data :
$ artisan db:seed --class=DevDatabaseSeeder
Discover package
$ artisan package:discover
In development environnement, rebuild the database :
$ artisan migrate:fresh --seed
Clients can access to the REST API. API requests require authentication via token. You can create a new token in your user profile.
Then, you can use this token either as url parameter or in Authorization header :
https://laravel-blog.app/blog/api/v1/posts
API are prefixed by api
and the API version number like so v1
.
Do not forget to set the X-Requested-With
header to XMLHttpRequest
. Otherwise, Laravel won't recognize the call as an AJAX request.
To list all the available routes for API :
$ artisan route:list --path=api
MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=465
MAIL_USERNAME=[email protected]
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=[email protected]
MAIL_PASSWORD=!2345NR%21
MAIL_FROM_NAME="SunnyGeorgia"
https://sunnygeorgia.travel/blog/admin/dashboard
email: [email protected]
password: FT4pJiRXK2WdDvv
https://sunnygeorgia.travel/blog/horizon
https://sunnygeorgia.travel/blog/telescope