- Laravel blog with AdminLTE interface
- TinyMCE editor for rich text editing
- Article tags and categories management
- User registration and admin panel
- Docker-based development environment
- Docker and Docker Compose
- Make (optional, for convenience)
- Clone the repository
- Copy environment file:
cp .env.example .env
- Start containers:
make up
ordocker compose up --build
- Install dependencies:
make composer-install
- Run migrations:
make migrate
- Seed demo data:
docker compose exec php-fpm php artisan db:seed
- Install and build frontend assets:
make npm-i make npx-mix
- Configure mail settings in
.env
for subscription functionality
git clone [repository-url]
cd phpqa.ru
cp .env.example .env
make init # Runs full setup
After seeding the database, you can login with:
- Admin:
admin@phpqa.ru
/admin123
- User:
user@phpqa.ru
/user123
The seeder creates:
- 5 categories and 10 tags
- 25 blog posts (20 regular + 5 featured)
- Admin and regular user accounts
For more detailed information about factories and seeders, see Docs/FACTORIES.md
# Fresh installation with demo data
docker compose exec php-fpm php artisan migrate:fresh --seed
# Add more demo data
docker compose exec php-fpm php artisan db:seed --class=BlogSeeder
make up # Start all containers
make down # Stop containers
make bash # Enter PHP container
make build # Build and start in background
make migrate # Run database migrations
git pull
make build
make migrate
make npm-run-prod
Run tests inside the PHP container:
make bash
./vendor/bin/phpunit --filter TestName
Or directly:
docker compose exec php-fpm ./vendor/bin/phpunit
The "Laravel Telescope" will be enabled when TELESCOPE_ENABLED
is true.
Access will be if APP_ENV
is local.
docker compose exec php-fpm php artisan telescope:install
docker compose exec php-fpm php artisan migrate
after updating:
docker compose exec php-fpm php artisan telescope:publish
The Debugbar will be enabled when APP_DEBUG is true.
Run artisan commands inside the container:
make bash
php artisan make:model Post -a
php artisan migrate:refresh
php artisan migrate:refresh --path=/database/migrations/fileName.php
- Main Laravel app:
app-laravel/api-laravel/
- Working directory in container:
/app
- Access:
http://phpqa.local
(dev) orhttps://phpqa.ru
(prod)
Open post with comment text field, after it open browser console and write:
document.querySelectorAll('input[name="countMe"]')[0].value;
let honeypot = document.getElementById('honeypot');
honeypot.value;
docker compose exec php-fpm php artisan optimize:clear
docker compose exec php-fpm composer dump-autoload