Skip to content

zda17/react-breeze-inertia-laravel10

Repository files navigation

(React + Tailwind) && (Inertia + Laravel) Starter Kit

GETTING STARTED

Clone this repo and then change .env.example to just .env

Or, run

touch .env

and copy the contents of .env.example into your new .env file.


Install Composer (if you've worked with Laravel before, skip this step)

Paste this in your terminal:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" <br>
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') {     echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Run the following in your terminal to move composer into your $PATH

sudo mv composer.phar /usr/local/bin/composer

If you run into any trouble, you can go here and read more: https://getcomposer.org/download/

Install NPM packages

npm install

Install composer packages

composer install

Install Sail (Laravel's built-in Docker config

php artisan sail:install

then type 0 for msyql, press enter

then:

php artisan key:generate

then just to double check run:

composer update

Add sail to your $path (so you can just use 'sail' in future terminal commands):

alias sail='bash vendor/bin/sail'

If you get a "sail command not found" then just re-run this anytime.

Open Docker Destkop

If you don't have Docker Desktop, you can download it here: https://www.docker.com/products/docker-desktop

Once it's open, run this in your terminal:

sail up

This will start the docker container(s)( If you get a "sail command not found" then you can run -- otherwise skip to the next step):

./vendor/bin/sail up

If you run into any trouble, the Sail documentation is here: https://laravel.com/docs/8.x/sail#introduction


Open a new tab in the terminal and run:

sail artisan migrate

Or if you're still getting the "sail command not found", run this:

./vendor/bin/sail artisan migrate

For a list of commands you can run, run:

./vendor/bin/sail artisan

Migrations need to be run using 'sail' instead of 'php' so that they are run inside the docker container

Now run:

npm run dev

Launch 🚀

Main page is here:

localhost

You'll need a DB client. I like to use TablePlus.
You can download it here: https://tableplus.com/.

Once you have that downloaded, open it up and click "create a new connection".
Your info should look something like the image below (click "Test" for the boxes to turn green), and then click "Connect":

Screen Shot 2021-05-19 at 10 04 43 PM

If you have trouble connecting to DB, see: https://laracasts.com/discuss/channels/servers/laravel-sail-no-dbdb-user-created

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published