A full-featured blog platform built with Laravel featuring role-based access control, post moderation, comments system, and notifications.
- User Registration & Authentication - All registered users start as "User" role
- Post Management - Create posts with title, photo, description, and category
- Comments System - Comment and reply to posts (nested subcomments)
- Post Moderation - Approval/rejection workflow for content quality
- Notifications - Real-time notifications for users and moderators
- Auto-Approval - Posts automatically approved after 2 hours if not moderated
- Category Filtering - Browse posts by category
- Image Upload - Support for post images with storage management
- Create blog posts with title, photo, description, and category
- View all approved posts
- View own posts with status (pending/approved/rejected)
- Edit and delete own posts
- Write comments and replies on approved posts
- Edit own comments (marked as "edited")
- Delete own comments
- Receive notifications when posts are approved/rejected
- View personal notification history
- All User permissions
- Access moderation queue
- Approve or reject pending posts
- Receive notifications when new posts are submitted
- View all pending posts with full details
- All Moderator permissions
- Manage all users
- Change user roles (User ↔ Moderator ↔ Admin)
- Delete any post from any user
- Full platform control
- View all approved posts
- Browse posts by category
- Read full post details
- See comments (cannot comment without login)
- Sort posts by date (newest first)
- Clone the repository
git clone <repository-url>
cd enterprise_georgia- Install dependencies
composer install
npm install- Configure environment
cp .env.example .env
php artisan key:generate- Setup database (configure
.envwith your database credentials)
php artisan migrate
php artisan db:seed- Create storage link
php artisan storage:link- Start development server
php artisan serveVisit: http://localhost:8000
Three test accounts are created by default:
| Role | Password | |
|---|---|---|
| Admin | admin@example.com | password |
| Moderator | moderator@example.com | password |
| User | user@example.com | password |
Posts pending moderation are automatically approved after 2 hours.
php artisan schedule:workphp artisan posts:auto-approveAdd to crontab:
* * * * * cd /path-to-project && php artisan schedule:run >> /dev/null 2>&1- User writes post with title, category, description, and optional photo
- Post submitted with status:
pending - All moderators receive notification
- User can view post in "My Posts" with pending status
- Moderator sees post in moderation queue
- Moderator reviews and approves or rejects
- User receives notification of decision
- Approved posts appear on main feed
- If not moderated within 2 hours, post auto-approves
- Any authenticated user can comment on approved posts
- Users can reply to comments (nested structure)
- Comment authors can edit (marked as "edited") or delete
- Comments display with author name and timestamp
- Admin accesses user management panel
- Can change any user's role via dropdown
- Can delete any post from any user
- Changes take effect immediately
- id, name, email, password, role (user/moderator/admin), timestamps
- id, user_id, title, photo, description, category, status (pending/approved/rejected), submitted_at, timestamps
- id, post_id, user_id, parent_id, content, is_edited, timestamps
- id, user_id, type, message, post_id, is_read, timestamps
- Framework: Laravel 11
- Database: MySQL/PostgreSQL/SQLite
- Frontend: Blade Templates with custom CSS
- Authentication: Laravel Auth
- File Storage: Laravel Storage (public disk)
app/
├── Console/Commands/
│ └── AutoApprovePosts.php # Auto-approval command
├── Http/
│ ├── Controllers/
│ │ ├── AdminController.php # User & post management
│ │ ├── AuthController.php # Login/Register
│ │ ├── CommentController.php # Comment CRUD
│ │ ├── ModerationController.php # Post moderation
│ │ ├── NotificationController.php # Notifications
│ │ └── PostController.php # Post CRUD
│ └── Middleware/
│ └── CheckRole.php # Role authorization
└── Models/
├── User.php # User with role helpers
├── Post.php # Post model
├── Comment.php # Comment with nesting
└── Notification.php # User notifications
resources/views/
├── layouts/
│ └── app.blade.php # Main layout
├── auth/ # Login/Register views
├── posts/ # Post views (index, show, create, edit, my)
├── moderation/ # Moderation queue
├── admin/ # Admin panel
└── notifications/ # Notification center
routes/
└── web.php # All application routes