2016-07-22 89 views
0

我試圖安裝yajra/laravel-數據表甲骨文:〜6.0到我的項目,但我不斷收到以下錯誤:錯誤安裝yajra/laravel-數據表甲骨文:〜6.0 Laravel 5.2

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文件:

{ 
    "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 39年2月5日。任何幫助,將不勝感激。謝謝。

+0

你爲什麼有 「laravel /框架」: 「5.2 *」 的要求和 「laravel /框架」: 「5.0 *」,在需要開發? –

+0

DOH!你錯過了。需要更多的咖啡因,謝謝! –

回答

0

在我的composer.json中require和require dev是不同的幼蟲版本。感謝Calin Blaga指出了這一點。

1

只是用這個。 遵循 https://datatables.yajrabox.com/starter

,你的代碼將

 Route 
    Route::get('datatables',['uses'=>'[email protected]', 'as' => 'datatables']); 
    Route::get('datatables/{data}',['uses'=>'[email protected]', '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') !!}' 
     });