You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
sundayenglish 62173e9ace Add loading Permission 4 weeks ago
app Add Title Permission 4 weeks ago
bootstrap Add File auth.php and config Provider in router 4 weeks ago
config Add File auth.php and config Provider in router 4 weeks ago
database Added Feature Permission 4 weeks ago
docker Init Project 4 weeks ago
public Add loading Permission 4 weeks ago
resources Add loading Permission 4 weeks ago
routes Add Permission 4 weeks ago
storage Init Project 4 weeks ago
tests Init Project 4 weeks ago
.editorconfig Init Project 4 weeks ago
.env.example Mapping database authentication to Sunday English 4 weeks ago
.gitattributes Init Project 4 weeks ago
.gitignore Init Project 4 weeks ago
README.md Add Soft UI 4 weeks ago
artisan Init Project 4 weeks ago
composer.json Add Feature Livewire and Taiwindcss 4 weeks ago
composer.lock Add Feature Livewire and Taiwindcss 4 weeks ago
docker-compose.yml Init Project 4 weeks ago
package-lock.json Add Feature Livewire and Taiwindcss 4 weeks ago
package.json Add Feature Livewire and Taiwindcss 4 weeks ago
phpunit.xml Init Project 4 weeks ago
postcss.config.cjs Add Feature Livewire and Taiwindcss 4 weeks ago
tailwind.config.js Add Feature Livewire and Taiwindcss 4 weeks ago
vite.config.js Add Soft UI 4 weeks ago

README.md

Laravel 12 - Content Management Project (Dockerized)

This project is a content management system (CMS) built with Laravel 12, running in a development environment powered by Docker + Docker Compose It integrates modern Laravel tools including:

  • Livewire – For building reactive components using Blade.
  • Passport – Provides API authentication using OAuth2.
  • Vite – Bundles and hot-reloads frontend assets efficiently.


🛠 Requirements

Component Description
Laravel 12 Primary PHP framework using MVC architecture
PHP 8.4 (FPM) Latest version of PHP with high performance
MySQL 8 Relational database management system
Nginx Lightweight and fast web server for handling HTTP requests
Docker Isolated and portable containerized environment
Docker Compose Manage multiple containerized services in one configuration
Composer PHP dependency manager

🚀 Install

1. Clone the project

git clone 
cd project

2. Create the .env file

cp .env.example .env

📄 Example .env Configuration

APP_URL=http://localhost:8080

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=secret

SESSION_DRIVER=database

3. Build and start Docker containers

docker-compose up -d --build

4. Run composer to install package and NPM

composer install --ignore-platform-reqs
npm install

5. Generate application key

php artisan key:generate

🔐 API Authentication with Laravel Passport

Laravel Passport provides a complete OAuth2 authentication system for your Laravel APIs. Below are the steps to install and configure Passport for this Laravel 12 (Dockerized) project.

1. Create a Password Grant Client

php artisan passport:client --password

2. Get an Access Token via API

Endpoint:

POST http://<url_local>:<port>/oauth/token

Headers:

Accept: application/json
Content-Type: application/x-www-form-urlencoded

Body:

grant_type=password
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
username=test@example.com
password=secret123
scope=

Successful Response

{
  "token_type": "Bearer",
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
  "expires_in": 3600
}