📝 Car rental is a full stack api rest web application made to rent cars. The application have admin and user role, only admins can create brands, car models and cars. Users only can rent cars to use.
- Docker
- Docker Compose
- Git
- Clone this repository
git clone https://github.com/WillianMafra/Car-Rental.git
- Access the project directory.
cd Car-Rental
- Install Composer dependencies.
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php83-composer:latest \
composer install --ignore-platform-reqs
- Create an alias to simplify using Sail.
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
- Rename the .env copy file to .env.
mv '.env.example' .env
- Initialize the Docker environment using Sail.
sail up -d
- Access the application container.
sail shell
- Generate an application key.
php artisan key:generate
- Run database migrations.
php artisan migrate --seed
- Create the jwt secret key.
php artisan jwt:secret
- Create the link to storage files.
php artisan storage:link
- Run npm install to install Node.js dependencies and npm run dev to compile assets.
npm install
npm run dev
After following the steps above, the Car Rental app should be up and running and accessible through the web browser at the following address:
http://localhost/login
You can login in the application as user with the email => '[email protected]' and password '12345' or login as admin using email => '[email protected] and password '12345'
To stop the Sail environment, exit the application shell by typing
exit
and then execute the following command in the project directory:
sail down
Willian Mafra |