This project is a Posts Management System built with Laravel, following the MVC architecture, and utilizing Eloquent ORM for database interactions. It includes user authentication and various functionalities to manage posts.
- User authentication (registration, login)
- Create, read, update, and delete posts
- User roles and permissions
- Data validation
- Error handling
- Backend: Laravel
- Frontend: Blade templating engine
- Database: MySQL
- Authentication: Laravel built-in authentication
- ORM: Eloquent ORM
Make sure you have the following installed on your machine:
- PHP (>=7.3)
- Composer
- MySQL
- Node.js and npm
-
Clone the repository:
git clone https://github.com/usama739/posts-management-system.git cd posts-management-system
-
Install backend dependencies:
composer install
-
Install frontend dependencies:
npm install
-
Configure your database in the
.env
file:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
-
Run the database migrations:
php artisan migrate
-
(Optional) Seed the database:
php artisan db:seed
-
Compile the frontend assets:
npm run dev
Or for production:
npm run prod
-
Start the development server:
php artisan serve
Open your web browser and navigate to http://localhost:8000
.
- Register a new user.
- Login with the registered credentials.
- Create Post: Navigate to the "Create Post" section to add a new post.
- Read Posts: View a list of all posts on the main page.
- Update Post: Edit an existing post by clicking on the edit button.
- Delete Post: Remove a post by clicking on the delete button.