Adnan Ali
Adnan Ali

Reputation: 83

Yajra DataTable Is Not Installing on Laravel 5.7.*

I am facing problem while installing Yajra Datatable by using this Command " composer require yajra/laravel-datatables:^1.0 "on Powershell and I got errors. I have Uninstall Wampp and installed Xampp but the problem still exists. Please Help me out to figure out why this is happening is any PHP version issue or something else. I am solving this issue from two days to since now but I failed.

Code snippet of problem

Problem 1

Here is my Composer.json

{

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": "^7.1.3",
    "emotality/tawk-laravel": "^1.0",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "5.7.*",
    "laravel/tinker": "^1.0",
    "spatie/laravel-newsletter": "^4.2",
    "yajra/laravel-datatables": "1.0",

},

"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/"
    }
},
"extra": {
    "laravel": {
        "dont-discover": [
        ]
    }
},
"scripts": {
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate"
    ],
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

System details

Operating System Windows

PHP 7.2.11

Laravel Version 5.7.12

Laravel-Datatables Version ^1.0

Upvotes: 5

Views: 5684

Answers (2)

Ilya Kolesnikov
Ilya Kolesnikov

Reputation: 652

I had a problem with updating laravel from 5.7 to 5.8 because of yajra/laravel-datatables-oracle. I removed this package from composer.json, made laravel update with composer update and then made composer require yajra/laravel-datatables-oracle

Upvotes: 1

Ahmed Atallah
Ahmed Atallah

Reputation: 116

I just had this issue, just run this command.

composer require yajra/laravel-datatables

should install latest version of the package, or add this line

"yajra/laravel-datatables": "^1.2"

to composer.json then run

composer update

Upvotes: 10

Related Questions