首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装yajra/ Laravel -datatable错误-oracle:~6.0和Laravel 5.2

安装yajra/ Laravel -datatable错误-oracle:~6.0和Laravel 5.2
EN

Stack Overflow用户
提问于 2016-07-22 12:58:49
回答 2查看 3.5K关注 0票数 0

我正在尝试将yajra/laravel-datatables oracle:~6.0安装到我的项目中,但我始终得到以下错误:

代码语言:javascript
复制
composer require yajra/laravel-datatables-oracle:~6.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package laravel/framework == 5.2.39.0 is satisfiable by larave
l/framework[v5.2.39] but those are rejected by your minimum-stability.
  Problem 2
    - Conclusion: don't install laravel/framework v5.0.35
    - Conclusion: don't install laravel/framework v5.0.34
    - Conclusion: don't install laravel/framework v5.0.33
    - Conclusion: don't install laravel/framework v5.0.32
    - Conclusion: don't install laravel/framework v5.0.31
    - Conclusion: don't install laravel/framework 5.0.30
    - Conclusion: don't install laravel/framework v5.0.29
    - Conclusion: don't install laravel/framework v5.0.28
    - Conclusion: don't install laravel/framework v5.0.27
    - Conclusion: don't install laravel/framework v5.0.26
    - Conclusion: don't install laravel/framework v5.0.25
    - Conclusion: don't install laravel/framework v5.0.24
    - Conclusion: don't install laravel/framework v5.0.23
    - Conclusion: don't install laravel/framework v5.0.22
    - Conclusion: don't install laravel/framework v5.0.21
    - Conclusion: don't install laravel/framework v5.0.20
    - Conclusion: don't install laravel/framework v5.0.19
    - Conclusion: don't install laravel/framework v5.0.18
    - Conclusion: don't install laravel/framework v5.0.17
    - Conclusion: don't install laravel/framework v5.0.16
    - Conclusion: don't install laravel/framework v5.0.15
    - Conclusion: don't install laravel/framework v5.0.14
    - Conclusion: don't install laravel/framework v5.0.13
    - Conclusion: don't install laravel/framework v5.0.12
    - Conclusion: don't install laravel/framework v5.0.11
    - Conclusion: don't install laravel/framework v5.0.10
    - Conclusion: don't install laravel/framework v5.0.9
    - Conclusion: don't install laravel/framework v5.0.8
    - Conclusion: don't install laravel/framework v5.0.7
    - Conclusion: don't install laravel/framework v5.0.6
    - Conclusion: don't install laravel/framework v5.0.5
    - Conclusion: don't install laravel/framework v5.0.4
    - Conclusion: don't install laravel/framework v5.0.3
    - Conclusion: don't install laravel/framework v5.0.2
    - Conclusion: don't install laravel/framework v5.0.1
    - Conclusion: remove vlucas/phpdotenv v2.3.0
    - Installation request for laravel/framework 5.0.* -> satisfiable by laravel/f
ramework[5.0.30, v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0
.15, v5.0.16, v5.0.17, v5.0.18, v5.0.19, v5.0.2, v5.0.20, v5.0.21, v5.0.22, v5.0.2
3, v5.0.24, v5.0.25, v5.0.26, v5.0.27, v5.0.28, v5.0.29, v5.0.3, v5.0.31, v5.0.32,
 v5.0.33, v5.0.34, v5.0.35, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].
    - Conclusion: don't install vlucas/phpdotenv v2.3.0
    - laravel/framework v5.0.0 requires vlucas/phpdotenv ~1.0 -> satisfiable by vl
ucas/phpdotenv[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, v1.0.8, v1.0.9, v1
.1.0, v1.1.1].
    - Can only install one of: vlucas/phpdotenv[1.0.0, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.1, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.2, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.3, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.4, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.5, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[1.0.6, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[v1.0.8, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[v1.0.9, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[v1.1.0, v2.3.0].
    - Can only install one of: vlucas/phpdotenv[v1.1.1, v2.3.0].
    - Installation request for vlucas/phpdotenv == 2.3.0.0 -> satisfiable by vluca
s/phpdotenv[v2.3.0].


Installation failed, reverting ./composer.json to its original content.

这是我的composer.json文件:

代码语言:javascript
复制
{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*",
        "laravel/framework": "5.2.*",
        "illuminate/html": "~5.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

我安装了php 5.6.19和Laravel 5.2.39。任何帮助都将不胜感激。谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-07-22 13:52:40

在我的composer.json中,Require和require是不同的幼虫版本。感谢Calin Blaga指出了这一点。

票数 0
EN

Stack Overflow用户

发布于 2016-08-24 04:10:58

用这个就行。遵循https://datatables.yajrabox.com/starter

你的代码将会是

代码语言:javascript
复制
        Route
    Route::get('datatables',['uses'=>'DatatablesController@getIndex', 'as' => 'datatables']);
    Route::get('datatables/{data}',['uses'=>'DatatablesController@anyData', 'as' => 'datatables.data']);

    Controller
      public function anyData()
        {
           $users = User::select(['id', 'name', 'email', 'created_at', 'updated_at'])->get();
        return Datatables::of($users)->make();
        }

    JS
    $('#users-table').DataTable({
            processing: true,
            serverSide: true,
            ajax: '{!! url('datatables/data') !!}'
        });
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38527099

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档