Rent-A-Car is a Laravel application designed to facilitate car rentals. It allows users to register, login, and perform various actions related to car rentals, including browsing cars, managing transactions, managing rental agents, and searching for cars by name. The application includes features such as user roles, controllers, models, Eloquent relationships, migrations, seeders, factories, file uploads, and API routes with authentication and authorization.
-
User Registration and Authentication:
- Users can register and login to the application.
- Authentication is managed using Laravel Sanctum.
-
User Roles:
- The application includes multiple user roles: regular user and administrator.
- Each role has specific permissions and access levels within the application.
-
Car Management:
- Users can view all available cars.
- Cars can be searched by name.
- Admins can add, update, and delete cars.
- Images of cars are stored within the application.
-
Rental Agent Management:
- Users can view all rental agents participating in transactions.
- Admins can add, update, and delete rental agents.
-
Transaction Management:
- Users can create, update, and delete transactions.
- Admins can modify the status of transactions.
- User Registration: New users can register for an account.
- User Login: Registered users can log in to the application.
- Administrator Login: Admins have a separate login interface with extended privileges.
- User Logout: Users can log out of the application.
- View All Users: Admins can view all users registered in the system.
- View All Cars: Users can browse all available cars.
- View All Rental Agents: Users can see a list of all rental agents.
- View All Transactions: Users can see a list of all transactions.
- Retrieve Car by ID: Users can retrieve detailed information about a specific car by its ID.
- Retrieve User by ID: Admins can retrieve detailed information about a specific user by their ID.
- Retrieve Agent by ID: Admins can retrieve detailed information about a specific rental agent by their ID.
- Retrieve Transaction by ID: Users can retrieve detailed information about a specific transaction by its ID.
- Search Cars by Name: Users can search for cars by name.
- Create New Transaction: Users can create a new transaction for renting a car.
- Update Transaction: Users can modify details of an existing transaction.
- Delete Transaction: Users can cancel a transaction.
- Create New Agent: Admins can add a new rental agent to the system.
- Update Agent: Admins can modify details of an existing rental agent.
- Delete Agent: Admins can remove a rental agent from the system.
- Update Transaction Status: Admins can update the status of a transaction.
- Create New Car: Admins can add a new car to the system.
- Update Car Details: Admins can modify details of an existing car.
- Delete Car: Admins can remove a car from the system.
- Laravel Framework
- Laravel Sanctum for API authentication
- Eloquent ORM for database interactions
- MySQL database for data storage
- PHP for server-side scripting
- Clone the repository from GitHub.
- Install dependencies using Composer (composer update).
- Set up the database configuration in the
.env
file. - Run migrations and seeders to populate the database with initial data (php artisan migrate:fresh --seed).
- Start the Laravel development server (php artisan serve).
- Access the application in your web browser.
- Test the application via Postman where you can copy the routes in the api.php file.
- Laravel Documentation
- Laravel Sanctum Documentation
- Stack Overflow community
- Laravel community