Create new laravel project laravel t
To create a new Laravel project, you can use the following command:
composer create-project --prefer-dist laravel/laravel project-name
Replace project-name
with the name you want to give your project.
For example, if you want to create a project called my-laravel-app
, you would run:
composer create-project --prefer-dist laravel/laravel my-laravel-app
This command will create a new directory called my-laravel-app
and initialize a new Laravel project inside it.
You can also use the following command to create a new Laravel project:
laravel new project-name
This command is available if you have Laravel installed globally on your system. If you don't have Laravel installed globally, you can use the composer
command instead.
Once the project is created, you can navigate to the project directory and start working on your Laravel application.
Here's a breakdown of the command:
composer
: This is the command-line tool for managing dependencies in PHP projects.create-project
: This is a command that creates a new project from a given package.--prefer-dist
: This option tells Composer to download the package in distribution form, which is faster and more efficient.laravel/laravel
: This is the package name for the Laravel framework.project-name
: This is the name of the project you want to create.
Note: Make sure you have Composer installed on your system and that you have a stable internet connection before running the command.