Skip to content

ElHombreSinNombre/laravel-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guide

Install Node, PHP, Composer and Docker Desktop.

Open Docker Desktop, then with CMD launch this commands

cd docker
docker-compose up -d

In laravelVue folder we must to copy-paste env.example and rename new file as .env. In this file we must to set your database connections.

Default connection in .env file for this project.

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=laravelvue
DB_USERNAME=root
DB_PASSWORD=secret

Don´t forget to set MailTrap credentials.

With CMD launch this commands

cd laravelVue
composer install
npm install
php artisan key:generate

After all we can edit etc/host file to use a domain name.

Host

We can access to the web in localhost (127.0.0.1) or in laravelvue.com.

Frontend

Backend

  • Laravel (PHP).

    If return a error when launch migrations change mariadb to localhost in laravelVue .env file. Some scripts must be to launch in docker container, if we prefer we can use this little trick to launch it from outside of docker. Then return file to original state.

    • Default credentials if we need to enter in PHPMyadmin

      User: root
      Password: secret
      

Other Tools

  • Postman.
    • Check it postman folder environments.json. There are some environments values. Change url_base (www docker container IP) or url_domain (if we configure it in etc/host) value if it necessary.

    • Launch this command

       npm install newman
       npm install newman-reporter-htmlextra
       cd postman
       newman run collection.json -e environments.json -r cli,htmlextra
      

Other considerations

Email

  • A email system (with MailTrap) send email when car is deleted from datatable. Email is sent to a user related to this car.

    A user can drive one car, a car could driven by one user.

    email

Credentials

  • Admin user

    • Name: Admin
    • Password: test
  • Reviewer user

    • Name: Reviewer
    • Passwod: test

Vue and Blade

  • To avoid excessive complexity we use Vue only in the forms and tables views.

Database

DDBB