Follow the steps to set the application on your local machine.
Step N°1 - Run the following commands below to install the dependencies (Verify the existence of Composer
, Node
and NPM
on your machine).
composer install
cp .env.example .env
php artisan cache:clear
composer dump-autoload
php artisan key:generate
Step N°2 - In .env
file set the following snippet to connect the application to your database (Verify your database, it is necessary create a database to create the migrations).
# MySQL
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=name_database
DB_USERNAME=root
DB_PASSWORD=
# PostgreSQL
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=name_database
DB_USERNAME=postgres
DB_PASSWORD=
Step N°3 - Execute the migrations.
php artisan migrate
Step N°4 - Use the commands to create some populated tables to some selection fields at forms (and users table).
php artisan db:seed
Step N°5 - View the migrations been dones e verify status them.
php artisan migrate:status
Step N°6 - Run the following command to install Vite
.
npm install
Step N°7 - You need decide an option to start the Vite
.
# Run Vite to server development
npm run dev
# Create and version assets for production... (I usually choose this on my local machine)
npm run build
Step N°8 - Run the following command to start Apache to run the application.
php artisan serve
With help of Laravel Spatie, exist two roles user: Admin and User. Making certains roles user has more privileges than others, it is very important you run the seeds to those users be created.
- Nome: Mario
Email: mario@world.com
Password: 12345678
Role: Admin, User
Permission: NULL
- Nome: Luigi
Email: luigi@world.com
Password: 12345678
Role: User
Permission: NULL
Some functionality are exclusives to Admin, others types of roles has not the same privileges.