Run Laravel Project From Github Repository.

This simple steps will show you how to follow each step to clone a laravel project from a github repository so you can run it in your local computer.

  1. Open a terminal command console
  2. Clone the laravel project from Github
    $ git clone https://github.com/aloha202/laravel9_inertia_vue_crud.git
  3. cd into the newly created folder:
    $ cd laravel9_inertia_vue_crud
  4. Run the composer installl command in your terminal
    $ composer install
  5. Install FrontEnd
    $ npm install
  6. Make a copy to create a .env file:
    $ cp .env.example .env
  7. Open project with Visual Code:
    $ code .
  8. Ope and Edit .env file:
    $ cp .env.example .env; code .env

    SQLITE: https://www.webune.com/forums/laravel-sqlite-setup-run-and-install-sqlite-in-laravel-application-as-the-default-database.html
  9. Make the appropriate configuration changes, Specially your database connection details.
  10. Migrate the database
    $ php artisan migrate
  11. Run php artisan to generate a key
    $ php artisan key:generate
  12. Run the PHP Server
    $ php artisan serve
  13. Run Vite Fronend server:
    $ npm run dev
  14. Open with browser: http://localhost:8000/
  15. Done

Example repo:

git clone https://github.com/John-Weeks-Dev/amazon-clone.git
cd amazon-clone
composer install
cp .env.example .env
php artisan cache:clear
composer dump-autoload
php artisan key:generate

composer require laravel/breeze --dev
or if you get an error:
composer require --dev laravel/breeze:*

php artisan breeze:install vue --inertia
php artisan migrate
php artisan db:seed
php artisan serve

Be sure to update your database in .env:

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

 

 

 

UPDATE: GOT ERROR? To ignore error try this command:

composer install --ignore-platform-reqs

Or if you want to update:

composer update --ignore-platform-reqs

This is the error I received:

Installing dependencies from lock file (including require-dev)

Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - nette/schema is locked to version v1.2.1 and an update of this package was not requested.
    - nette/schema v1.2.1 requires php >=7.1 <8.1 -> your php version (8.1.12) does not satisfy that requirement.
  Problem 2
    - nette/utils is locked to version v3.2.3 and an update of this package was not requested.
    - nette/utils v3.2.3 requires php >=7.2 <8.1 -> your php version (8.1.12) does not satisfy that requirement.
  Problem 3
    - nette/schema v1.2.1 requires php >=7.1 <8.1 -> your php version (8.1.12) does not satisfy that requirement.
    - league/config v1.1.1 requires nette/schema ^1.2 -> satisfiable by nette/schema[v1.2.1].
    - league/config is locked to version v1.1.1 and an update of this package was not requested.