ubuntu16.04使用Composer创建Lavarel项目

安装composer的中文教程链接

安装composer的英文教程链接

创建Laravel项目  

composer create-project laravel/laravel firstLaravel


启动项目

方法1

php -S localhost:8888 -t public


方法2

php artisan serve


在创建项目时遇到problem:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - laravel/framework v5.6.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Problem 1 - phpunit/phpunit 4.8.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.

……

解决办法:

安装mbstring和dom扩展包即可:

sudo apt-get install php-mbstring

sudo apt-get install php-xml

你可能感兴趣的:(ubuntu16.04使用Composer创建Lavarel项目)