尝试通过Composer的此命令安装Laravel Datatable:
composer require yajra/laravel-datatables-oracle:^8.0
但是什么都没有加载。
当我更新作曲家时,它会挂起以下信息:
> 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/"
}
},
}
答案 0 :(得分:0)
使用此:
composer require yajra/laravel-datatables-oracle
成功安装软件包后,打开config / app.php文件并添加服务提供商和别名。
config/app.php
'providers' => [
Yajra\Datatables\DatatablesServiceProvider::class,
],
'aliases' => [
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
]
请访问链接Datatable with 5.7以获取更多信息
答案 1 :(得分:0)
终于奏效了。
composer config --global repo.packagist composer https://packagist.org
运行此命令后,我已经在下面的命令中运行了
composer require yajra/laravel-datatables-oracle
然后在2分钟内安装了软件包。
答案 2 :(得分:-1)
首先检查是否存在composer.lock
文件,如果存在,那么它将把您绑定到那些特定的软件包。如果要安装,请删除composer.lock,然后重试该过程,它将下载软件包。
确保通过git或类似方式在同行之间共享composer.lock,以便所有人都使用相同的软件包和相同的版本。