我是新来的Laravel和我有拉从git仓库一个项目。 .gitIgnore
文件包含:
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
我看到我的计划是行不通的。这实际上是一个后端,使用流明和被设定的路线,是不是通过连它的设置localhost:8080/myRouteName
访问
$router->group(['prefix' => 'myRouteName'], function () use ($router) {
$router->post('/', ['middleware' => 'auth', 'uses' => 'MyController@store']);
});
所以我想,我需要的/vendor
文件夹,因为我想为应用程序正常运行是必需的。我在导航项目的目录,然后运行命令:composer install
和我结束了this error:
PS C:\wamp64\www\myprojectname> composer install
[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available.
If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
然后我打开我的WAMP目录中,并没有能够找到php.ini
(php7.3.1,这在我的Windows用户环境变量设置),因为我只看到php-development.ini
和php-production.ini
。
所以我结束了命令:
composer config -g -- disable-tls true
然后通过运行composer install
再次我these errors:
PS C:\wamp64\www\myprojectname> composer install
You are running Composer with SSL/TLS protection disabled.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for illuminate/encryption v5.6.15 -> satisfiable by illuminate/encryption[v5.6.15].
- illuminate/encryption v5.6.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for illuminate/support v5.6.15 -> satisfiable by illuminate/support[v5.6.15].
- illuminate/support v5.6.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for mongodb/mongodb 1.3.1 -> satisfiable by mongodb/mongodb[1.3.1].
- mongodb/mongodb 1.3.1 requires ext-mongodb ^1.4.0 -> the requested PHP extension mongodb is missing from your system.
Problem 4
- Installation request for phpunit/phpunit 7.0.3 -> satisfiable by phpunit/phpunit[7.0.3].
- phpunit/phpunit 7.0.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 5
- illuminate/support v5.6.15 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/lumen-framework v5.6.3 requires illuminate/support 5.6.* -> satisfiable by illuminate/support[v5.6.15].
- Installation request for laravel/lumen-framework v5.6.3 -> satisfiable by laravel/lumen-framework[v5.6.3].
试图取消注释(在php-development.ini
和php-production.ini
)喜欢的东西:
extension=openssl
extension=mbstring
但这不是与错误的帮助。我composer.json
文件看起来像:
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"google/apiclient": "^2.0",
"jenssegers/mongodb": "^3.4",
"laravel/lumen-framework": "5.6.*",
"league/fractal": "^0.17.0",
"vlucas/phpdotenv": "~2.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"phpunit/phpunit": "~7.0",
"mockery/mockery": "~1.0"
},
"autoload": {
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/",
"database/"
]
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
所以基本上我不知道如何设置从Laravel/Lumen
回购扳回一个基本git
应用。
流明需要以下PHP扩展在你的PHP ini文件中启用。
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
(Qazxswpoi)
为了编辑使用WAMP,你必须右击在任务栏中的图标WAMP权php.ini文件,到PHP,然后单击php.ini中。
在这个文件中,你应该取消注释这两个扩展。
https://lumen.laravel.com/docs/5.7