Skip to content

planetscale/laravel-crud-mysql

Repository files navigation

Overview

This is the final repo for the Laravel MySQL Mood Tracker project showing PlanetScale integration. You can find the full tutorial on the PlanetScale blog.

mood-tracker

Run the application

  1. Clone the repo:
git clone git@github.com:planetscale/laravel-crud-mysql.git
  1. Install the dependencies (npm install for Tailwind):
cd laravel-crud-mysql
composer install
npm install
  1. Create your PlanetScale database. For complete instructions, see this section of the tutorial.

  2. Copy the .env file:

mv .env.example .env
  1. Update the .env database section with your PlanetScale credentials. It should look similar to this:
DB_CONNECTION=mysql
DB_HOST=xxxxxxxxxx.us-east-3.psdb.cloud
DB_PORT=3306
DB_DATABASE=laravel-mood-tracker
DB_USERNAME=xxxxxxxxxxx
DB_PASSWORD=pscale_pw_xxxxxx-xx-xxxxxxxxxxxxxxxxxxxxxxxx
MYSQL_ATTR_SSL_CA=/etc/ssl/cert.pem

Note: The value for MYSQL_ATTR_SSL_CA will depend on your system. You can find more information on our Secure Connections page.

  1. Run the migrations:
php artisan migrate
  1. Seed the database:
php artisan db:seed
  1. Start the build process (for Tailwind):
npm run watch
  1. Start the server:
php artisan serve
  1. View the application at http://localhost:8080

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published