guillaumebriday/laravel-blog
소개
PHP 8.6 기반의 Laravel 13 블로그 애플리케이션으로, Hotwire, Horizon, Telescope, Sanctum, Pest를 사용합니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalLaravel 13.x blog
The purpose of this repository is to show good development practices on Laravel as well as to present cases of use of the framework's features like:
- Authentication
- API
- Sanctum
- API Resources
- Versioning
- Blade
- Cache
- Email Verification
- Filesystem
- Helpers
- Horizon
- Localization
- Migrations
- Policies
- Providers
- Requests
- Seeding & Factories
- Testing
Beside Laravel, this project uses other tools like:
- Bootstrap 5.x
- Pest
- Pint
- Rector
- Font Awesome
- Hotwired
- Redis
- spatie/laravel-medialibrary
- hotwired-laravel/turbo-laravel
- Many more to discover.
Some screenshots
You can find some screenshots of the application on : https://imgur.com/a/Jbnwj
Installation
To create your development environment follow these instructions.
Requirements: PHP 8.6, Node.js 26 and Yarn (via Corepack). With mise, mise install installs the pinned Node.js version.
Setting up your development environment on your local machine:
$ git clone https://github.com/guillaumebriday/laravel-blog.git
$ cd laravel-blog
$ composer setup
$ php artisan storage:link
Now open http://laravel-blog.test.
Mailer
You can use Mailpit to test your emails in development.
Once installed, open http://localhost:8025.
Before starting
You need to run the migrations with the seeds :
$ php artisan migrate:fresh --seed
This will create a new user that you can use to sign in :
email: [email protected]
password: demodemo
And then, compile the assets :
$ yarn dev
Starting job for newsletter :
$ php artisan tinker
> PrepareNewsletterSubscriptionEmail::dispatch();
Useful commands
Start Laravel Horizon:
$ php artisan horizon
Seeding the database :
$ php artisan db:seed
Running tests (with Pest) :
$ composer test
Checking code style and refactorings (Pint, Rector and ESLint) :
$ composer test:lint
$ yarn lint
Fixing them automatically :
$ composer lint
Generating backup :
$ php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"
$ php artisan backup:run
Generating fake data :
$ php artisan db:seed --class=DevDatabaseSeeder
Discover package
$ php artisan package:discover
In development environment, rebuild the database :
$ php artisan migrate:fresh --seed
Accessing the API
Clients can access to the REST API. API requests require authentication via Bearer token.
Generate a new token:
curl --location --request POST 'laravel-blog.test/api/v1/authenticate?email=your_email&password=your_password' \
--header 'X-Requested-With: XMLHttpRequest'
And now you can use the meta.access_token key as your Bearer token:
curl --location 'laravel-blog.test/api/v1/posts' \
--header 'X-Requested-With: XMLHttpRequest' \
--header 'Authorization: Bearer access_token'
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 :
$ php artisan route:list --path=api
Contributing
Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.
License
This project is released under the MIT license.
관련 프로젝트 살펴보기
불러오는 중…