This is a step-by-step guide to setting up and running a Laravel application with Nuxt.js.
-
Make sure your machine meets the system requirements to run Laravel. You need PHP, MySQL, and other supporting components. See the Laravel documentation for more information on system requirements.
-
Create a new database named "laravel_nuxt" in MySQL or adjust to your preference.
-
Copy the
.env.example
file to.env
with the following command:cp .env.example .env
-
Open the
.env
file and configure the database settings. Adjust the parameters as follows:
- DB_CONNECTION=mysql
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_DATABASE=laravel_nuxt
- D B_USERNAME=root
- DB_PASSWORD=
Be sure to fill in DB_HOST
, DB_PORT
, DB_DATABASE
, DB_USERNAME
, and DB_PASSWORD
according to your database settings.
-
Run the following command to install all PHP dependencies via Composer:
composer install
-
Run the following command to generate the application key:
php artisan key:generate
-
Run the following command to run migrations and seed the database with seed data:
php artisan migrate --seed
This will create the necessary tables in the database and populate it with initial seed data.
- Run the Laravel development server with the following command:
php artisan serve --port=8000
This will run a local development server at http://localhost:8000
.
- Open a browser and go to
http://localhost:8000
to see the running Laravel application.
- Make sure your MySQL server is running.
- If you encounter problems running the
php artisan
command, make sure PHP has been added to your system's PATH.
This is a simple guide to running a Laravel application with Nuxt.js. You can customize these steps according to your project's needs. For more information on developing with Laravel, you can refer to the official Laravel documentation. Copy this content and save it in a readme.md file using your text editor. Be sure to save the file with the .md extension to get the correct markdown formatting.
For Nuxt.js installation guide, please navigate to the 'frontend' folder.