A Laravel 12-based blog platform powered by Sanctum, Livewire, and Flux.
Make sure the following are installed on your system:
- PHP >= 8.1
- Composer
- MySQL
- Node.js & NPM
- Laravel 12
git clone https://github.com/devvspl/blog_platform.git
cd blog_platformcomposer installCopy the example environment file:
cp .env.example .envUpdate .env with your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=blog_platform
DB_USERNAME=root
DB_PASSWORD=rootSet cache driver to use the database:
CACHE_DRIVER=databasephp artisan key:generateRun all migrations:
php artisan migrateCreate the cache table:
php artisan cache:table
php artisan migratephp artisan db:seedcomposer require laravel/sanctumPublish Sanctum configuration and run migrations:
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
php artisan migrateAdd Sanctum middleware to app/Http/Kernel.php under the api group:
'api' => [
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],Install frontend packages:
npm installBuild assets for production:
npm run buildOr run in development mode:
npm run devcomposer require livewire/livewire
composer require livewire/fluxPublish Livewire config:
php artisan livewire:publishphp artisan serveYou can find detailed API documentation on Postman:
📄 Postman API Docs
php artisan cache:clearPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is open-source and available under the MIT License.