This project is a backend application built with the PHP Laravel framework, MySQL, and JWT (JSON Web Tokens) authentication. It provides a robust REST API for managing user authentication, category, and blog features, with multi-language support for English (EN), French (FR), and German (DE).
This is a login system with two types of users:
- Admin
- User
- Login: Secure login using JWT tokens.
- Register: New user registration. Sends email notifications to the user and the system admin.
- Forgot Password: Sends an email to the registered user with a password reset link.
- Reset Password: Allows users to securely reset their password.
- Profile: Fetch, update, and manage user profile data.
- User Registration: Email notifications are sent to both the newly registered user and the system admin.
- Forgot Password Request: Email with a reset link is sent to the registered user.
- List Categories: Retrieve a list of all categories.
- Add Category: Add a new category to the system.
- Update Category: Update an existing category.
- Category Details: Fetch details of a specific category.
- Delete Category: Delete a category.
- List Blogs: Retrieve a list of all blogs.
- Add Blog: Add a new blog post to the system.
- Update Blog: Update an existing blog post.
- Blog Details: Fetch details of a specific blog post.
- Delete Blog: Delete a blog post.
- Supports three languages: English (EN), French (FR), and German (DE).
- Language selection can be done via API headers.
Follow these steps to set up the Laravel application:
- Clone the Repository
git clone https://github.com/VikrantParmar/laravel-jwt-api-crudX.git cd laravel-jwt-api-crudX
- Install Dependencies
composer install
- Create Environment File
cp .env.example .env - Update the .env file with your database credentials and email configuration.
- Generate Application Key
php artisan key:generate
- Run Database Migrations
php artisan migrate
- Run Seeders
php artisan db:seed
- Run the Application
php artisan serve
- Access the Application Open your browser and navigate to
http://127.0.0.1:8000
Role | Username | Password |
---|---|---|
Admin | vikrant-admin@example.com | 123456789 |
User | vikrant-user@example.com | 123456789 |
User-Inactive | vikrant-inactive@example.com | 123456789 |
🔗 Visit the Postman Docs for more details Postman Docs
POST /api/v1/login
- User login.POST /api/v1/register
- User registration.POST /api/v1/forgot-password
- Request password reset.POST /api/v1/reset-password
- Reset password.GET /api/v1/profile
- Get user profile.
GET /api/v1/categories
- List categories.POST /api/v1/categories
- Add a new category.PUT /api/v1/categories/{id}
- Update a category.GET /api/v1/categories/{id}
- Get category details.DELETE /api/v1/categories/{id}
- Delete a category.
GET /api/v1/blogs
- List blogs.POST /api/v1/blogs
- Add a new blog post.PUT /api/v1/blogs/{id}
- Update a blog post.GET /api/v1/blogs/{id}
- Get blog details.DELETE /api/v1/blogs/{id}
- Delete a blog post.
Set the Accept-Language
header in your API requests to one of the following values:
en
for Englishfr
for Frenchde
for German
Note
Include additional setup instructions if you use third-party services (e.g., mail providers or APIs).
Multi-Language for only api reponse msg like success and error.
For questions, feedback, or collaboration inquiries, please contact:
Name: Vikrant Parmar
Email: vikrant.parmar91@gmail.com
Thank you for using this application! 😊