首页 > 解决方案 > 作曲家要求 laravel/ui 不适用于 Lumen 中的 php artisan make:auth

问题描述

我正在尝试运行 php artisan make:auth 并得到 make:provide command not found 的错误。然后我尝试使用 composer require larval/ui 命令,但出现错误提示

 illuminate/support v5.8.9 requires doctrine/inflector ^1.1 -> satisfiable by doctrine/inflector[1.1.x-dev, 1.2.x-dev, 1.3.1, 1.3.x-dev, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.x-dev, v1.1.0, v1.2.0, v1.3.0].
    - Can only install one of: doctrine/inflector[1.4.0, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.1, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.2, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.3, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.0.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.1.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.2.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.3.1, 2.0.3].
    - Can only install one of: doctrine/inflector[1.3.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.0.1, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.1.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.2.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.3.0, 2.0.3].
    - Installation request for doctrine/inflector (locked at 2.0.3) -> satisfiable by doctrine/inflector[2.0.3].
reverting composer.json back to its orginal contents

我看过有关运行 sudo-apt get install php 命令的帖子,但我使用的是 Mac 并安装了 home-brew,但不确定如何运行等效命令。我认为版本之间存在不匹配,但我似乎无法解决它

我的作曲家.json:

 "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.2.5",
        "laravel/lumen-framework": "^7.0",
        "facebook/graph-sdk": "^5.6",
        "laravel/socialite": "^3.0"
    },
    "require-dev": {
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "phpunit/phpunit": "^8.5"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ]
    }
}

标签: phplaravelcomposer-phplumen

解决方案


Lumen 只能用于创建 API。您可以在此使用用户界面。记住 Lumen 的工匠是不完整的。某些命令是不允许的。请记住,Lumen 中的所有交互都是针对 HTTP 协议的。身份验证在 Lumen 中的工作方式略有不同:https ://lumen.laravel.com/docs/7.x/authentication


推荐阅读