1// To install and use a specific version, you can enter it at the end of the command.
2// For example using version 5.8 ==>
3composer create-project --prefer-dist laravel/laravel projectName "5.8.*"
1composer global require laravel/installer
2
3laravel new example-app
4
5cd example-app
6
7php artisan serve
1// 3 ways to create project in laravel
2composer create-project --prefer-dist laravel/laravel APIDemo
3 laravel new laravel-backend-api
4 composer global require laravel/installer
1Schema::table('users', function($table)
2{
3 $table->create();
4 $table->increments('id');
5 $table->string('username');
6 $table->string('email');
7 $table->string('phone')->nullable();
8 $table->text('about');
9 $table->timestamps();
10});
11