guillaumebriday/laravel-blog

PHPlaravel-blog.guillaumebriday.fr

Laravel 11.0 blog application with Hotwire, Horizon, Telescope, Sanctum, Breeze and Pusher

laravelblogphpbest-practicesapilaravel-horizonlaravel-telescopehotwirehotwire-turbolaravel-breezelaravel-sanctumlaravel-11
Star 增长趋势
Star
1.8k
Forks
593
周增长
+0
Issues
7
5001k1.5k
2023年1月2024年3月2025年6月2026年9月
制品库Packagist
README

Laravel 11.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:

Beside Laravel, this project uses other tools like:

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.

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
$ php artisan key:generate
$ php artisan horizon:install
$ php artisan telescope:install
$ 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: demo@demo.com
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 :

$ php artisan test

Running Laravel Pint :

$ ./vendor/bin/pint --verbose --test

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.

相关仓库
shadcn-ui/ui

A set of beautifully-designed, accessible components and a code distribution platform. Works with your favorite frameworks. Open Source. Open Code.

TypeScriptnpmMIT Licensecomponentsnextjs
ui.shadcn.com
123.4k10.2k
laravel/laravel

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

Bladelibraryphpframework
laravel.com
84.9k24.9k
coollabsio/coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers.

PHPPackagistApache License 2.0nodejsmysql
coolify.io
61.6k5.4k
laravel/framework

Laravel is a web application framework with expressive, elegant syntax.

PHPPackagistlibraryMIT Licensephpframework
laravel.com
34.9k12k
filamentphp/filament

A powerful open-source UI framework for Laravel • Build and ship apps & admin panels fast with Livewire

PHPPackagistlibraryMIT Licenselaraveltailwind-css
filamentphp.com
32k4.2k
bagisto/bagisto

Open Source eCommerce & Multi-Vendor Marketplace Platform Built with Laravel for Enterprise-Scale Commerce, Supporting 10M+ SKUs

PHPPackagistappMIT Licenseecommerce-frameworklaravel
bagisto.com
28.1k3.3k
monicahq/monica

Personal CRM. Remember everything about your friends, family and business relationships.

PHPPackagistappGNU Affero General Public License v3.0laravelcrm
beta.monicahq.com
25.3k2.6k
krayin/laravel-crm

Krayin CRM is Free & Open Source CRM Built with Laravel for Customer, Lead, and Sales Management.

PHPPackagistMIT Licensephplaravel
krayincrm.com
23.8k1.6k
fruitcake/laravel-debugbar

Debugbar for Laravel (Integrates PHP Debug Bar)

PHPPackagistlibraryMIT Licenselaraveldebugbar
laraveldebugbar.com
19.3k1.6k
BookStackApp/BookStack

NOW MANAGED ON CODEBERG

PHPPackagistMIT Licensebookstacklaravel
codeberg.org/bookstack/bookstack
19k2.4k
koel/koel

Music streaming solution that works.

PHPPackagistMIT Licenselaravelvue
koel.dev
17.2k2.1k
flarum/flarum

Simple forum software for building great communities.

PHPPackagistappMIT Licensephpforum
flarum.org
16.4k1.7k