Installation

If you have PHP and Composer installed, you can install the Laravel installer via Composer:

composer global require laravel/installer

Creating a Laravel Application

After installing PHP, Composer, and the Laravel installer, you can create a new Laravel application. The Laravel installer will prompt you to choose your preferred testing framework, database, and starter kit:

laravel new example-app

Once the application is created, you can use the dev Composer script to start the Laravel local development server, queue workers, and Vite development server:

cd example-app
npm install && npm run build
composer run dev

Once the development server is started, your application will be accessible in your browser at http://localhost:8000. Next, you can update the .env configuration file to use your desired database. For example, if using MySQL, you can update the DB_* variables in the .env file as follows:

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

Installing Laravel Generator

Install via Composer:

composer require --dev foryoufeng/laravel-generator

Run the following command to install the code generator:

php artisan generator:install

Now you can access your application URL http://localhost:8000/laravel-generator to use Laravel Generator

UI Interface

After installation, access the link to see the following interface

Laravel Generator

Laravel Generator