Laravel 5.7: Laravel Datatable 未使用 Composer 安装

Laravel 5.7: Laravel Datatable is not installing with Composer

尝试使用 Composer 使用此命令安装 Laravel Datatable

composer require yajra/laravel-datatables-oracle:^8.0

但没有加载任何内容。

当我更新 composer 时,它挂起了这个信息:

> Loading composer repositories with package information Updating
> dependencies (including require-dev)

Composer.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "spatie/laravel-permission": "^2.20",
        "yajra/laravel-datatables-oracle": "^8.9"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    }

首先检查是否有 composer.lock 文件,如果有,它会将您绑定到那些特定的包。如果要安装它,请删除 composer.lock 然后重试该过程,它将下载软件包。

确保通过 git 或类似的方式在您的同行中共享 composer.lock,以便所有人都使用相同的包和相同的版本。

终于成功了。

composer config --global repo.packagist composer https://packagist.org

在 运行 执行此命令后,我有 运行 下面的命令

composer require yajra/laravel-datatables-oracle

然后在 2 分钟内安装了软件包。