I have a problem with packages, because I included Laravel 5 project to Laravel 4 project via composer.
After that, I got the error: Trait 'Illuminate\Foundation\Auth\Access\AuthorizesRequests' not found.
So, how can I add packages from Laravel 5 to Laraver 4?
I have tried to add "illuminate/auth: 1.1.*":
composer.json:
"require": {
"illuminate"/auth : "1.1"
}
and I got the error like this:
don't install illuminate/auth v1.1.0|don't install laravel/framework 4.1.x-dev
- Conclusion: remove symfony/http-foundation v2.4.10
- Conclusion: remove laravel/framework v4.1.31
Related
While installing laravel/ui I got this following error.
Using version ^2.0 for laravel/ui
Problem 1
- Conclusion: remove laravel/framework v6.18.0
- Conclusion: don't install laravel/framework v6.18.0
- laravel/ui 2.x-dev requires illuminate/support ^7.0 -> satisfiable by laravel/framework[7.x-dev], illuminate/support[7.x-dev, v7.0.0, v7.0.1].
- laravel/ui v2.0.0 requires illuminate/support ^7.0 -> satisfiable by laravel/framework[7.x-dev], illuminate/support[7.x-dev, v7.0.0, v7.0.1].
- Can only install one of: laravel/framework[7.x-dev, v6.18.0].
- don't install illuminate/support 7.x-dev|don't install laravel/framework v6.18.0
- don't install illuminate/support v7.0.0|don't install laravel/framework v6.18.0
- don't install illuminate/support v7.0.1|don't install laravel/framework v6.18.0
- Installation request for laravel/framework (locked at v6.18.0, required as ^6.2) -> satisfiable by laravel/framework[v6.18.0].
- Installation request for laravel/ui ^2.0 -> satisfiable by laravel/ui[2.x-dev, v2.0.0].
I'm using laravel version 6.18. How to solve this problem?
Try this:
it's working for my laravel 6.2
composer require laravel/ui "^1.2"
Laravel ui has been released alongside Laravel 7 about an hour ago and Laravel ui 2.0 depends on Laravel 7.
Either upgrade your project to Laravel 7 or install Laravel ui 1.x instead.
if you are using laravel 6, then try this command
composer require laravel/ui "^1.0" --dev -vvv
Are you trying to upgrade to laravel 7?
If that is the case you have to be doing something wrong I just updated as I said with no problems.
You have to update laravel first not the framework.
Only run composer update for framework after laravel is updated.
If you don't do this correctly you will always get errors.
Also, run composer clearcache
composer selfupdate
composer dumpautoload
If needed.
Also sometimes it helps to delete vendor and rerun composer install.
For laravel 6x:
composer require laravel/ui "^1.2"
For laravel 7x:
composer require laravel/ui "^2.0"
For laravel 8x:
composer require laravel/ui "^3.0"
For laravel 9x:
composer require laravel/ui "^4.0"
According to Laravel framework documentation use this command
Laravel 8. in requires laravel/ui version 3.4*
composer require laravel/ui:^3.4
Laravel 7. in requires laravel/ui version 2.4
composer require laravel/ui:^2.4
Laravel 6. in requires specific laravel/ui version 1.0*
composer require laravel/ui:^1.0 --dev
Run for current available version
composer require laravel/ui
I would like to use data tables with MongoDB database.
I've tried to search on GitHub projects especially pimlie/laravel-datatables-mongodb
composer require pimlie/laravel-datatables-mongodb:^1.1
I expect this package install very correctly because I have all requirements (yajra/laravel-datatables-oracle and jenssegers/mongodb) but it seems there are some conflicts.
the error messages are:
Problem 1
1. The requested package yajra/laravel-datatables-oracle (locked at v9.4.1, required as ^8.3) is satisfiable by yajra/laravel-datatables-oracle[v9.4.1] but these conflict with your requirements or minimum-stability.
Problem 2
1. Installation request for pimlie/laravel-datatables-mongodb 1.1 -> satisfiable by pimlie/laravel-datatables-mongodb[1.1.0].
Conclusion: remove laravel/framework v5.8.18
Conclusion: don't install laravel/framework v5.8.18
pimlie/laravel-datatables-mongodb 1.1.0 requires yajra/laravel-datatables-oracle ^8.3 -> satisfiable by yajra/laravel-datatables-oracle[v8.10.0, v8.11.0, v8.13.0, v8.13.1, v8.13.2, v8.13.3, v8.13.4, v8.13.5, v8.13.6, v8.13.7, v8.3.0, v8.3.1, v8.3.2, v8.3.3, v8.4.0, v8.4.1, v8.4.2, v8.4.3, v8.4.4, v8.5.0, v8.5.1, v8.5.2, v8.6.0, v8.6.1, v8.7.0, v8.7.1, v8.8.0, v8.9.0, v8.9.1, v8.9.2].
You are using the latest version of Laravel and this package is not compatible with the newest version of Laravel, change the composer.json file and downgrade the version of Laravel if you could.
Describe the bug
the lighthouse does not install on laravel 5.7
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
- Conclusion: don't install nuwave/lighthouse v2.6.4
- Conclusion: don't install nuwave/lighthouse v2.6.3
- Conclusion: don't install nuwave/lighthouse v2.6.2
- Conclusion: don't install nuwave/lighthouse v2.6.1
- Conclusion: don't install nuwave/lighthouse v2.6.0
- Conclusion: remove webonyx/graphql-php v0.13.1
- Installation request for nuwave/lighthouse ^2.6
-> satisfiable by nuwave/lighthouse[2.x-dev, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4].
- Conclusion: don't install webonyx/graphql-php v0.13.1
- nuwave/lighthouse 2.x-dev requires webonyx/graphql-php ^0.12
-> satisfiable by webonyx/graphql-php[0.12.x-dev, v0.12.0, v0.12.1, v0.12.2, v0.12.3, v0.12.4, v0.12.5, v0.12.6].
- Can only install one of: webonyx/graphql-php[0.12.x-dev, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.0, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.1, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.2, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.3, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.4, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.5, v0.13.1].
- Can only install one of: webonyx/graphql-php[v0.12.6, v0.13.1].
- Installation request for webonyx/graphql-php (locked at v0.13.1)
-> satisfiable by webonyx/graphql-php[v0.13.1].
If you have an existing Laravel 5.7 project, all you really need is two steps:
Install via composer require nuwave/lighthouse
Define your schema in graphql/schema.graphql
According to nuwave/lighthouse package you need to php: >= 7.1
Apart from this, you also need to complete the package's requirement in your project
I've a problem for using mailjet/laravel-mailjet, it seems a problem of versions.
I was using Laravel Framework 5.6.33 and i got
Can only install one of: laravel/framework[v5.6.39, 5.4.x-dev].
i've change my composer.json and now, i'm using Laravel Framework 5.6.39 but i've still the same problem
$ php artisan --version
Laravel Framework 5.6.39
There is the answer when i try to install mailjet/laravel-mailjet
$ composer require mailjet/laravel-mailjet
Using version ^1.1 for mailjet/laravel-mailjet
./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
- Can only install one of: laravel/framework[v5.6.39, 5.4.x-dev].
- Can only install one of: laravel/framework[5.4.x-dev, v5.6.39].
- Can only install one of: laravel/framework[5.4.x-dev, v5.6.39].
- mailjet/laravel-mailjet 1.1.0 requires laravel/framework 5.4.* -> satisfiable by laravel/framework[5.4.x-dev].
- Installation request for mailjet/laravel-mailjet ^1.1 -> satisfiable by mailjet/laravel-mailjet[1.1.0].
- Installation request for laravel/framework 5.6.39 -> satisfiable by laravel/framework[v5.6.39].
the 4th line explains it all.
mailjet/laravel-mailjet 1.1.0 requires laravel/framework 5.4.*
so, you can't use v5.6.39, only 5.4.*
After running,composer require laravel/scout
Added this in the config/app.php configuration file:
Laravel\Scout\ScoutServiceProvider::class,
Finally
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
The problem is it doesn't publish the scout.php file in the config folder...
Ok, to see you are doing something wrong, just use php artisan vendor:publish, without any parameter.
it will publish all available provides. if it doesn't work there should be an issue with the package, consider re-install it.
I had the same problem but using Lumen and the output in my case it was something like this:
Problem 1
- Conclusion: don't install laravel/scout v3.0.7
- Conclusion: don't install laravel/scout v3.0.6
- Conclusion: don't install laravel/scout v3.0.5
- Conclusion: don't install laravel/scout v3.0.4
- Conclusion: don't install laravel/scout v3.0.3
- Conclusion: don't install laravel/scout v3.0.2
- Conclusion: don't install laravel/scout v3.0.1
- Conclusion: don't install laravel/scout v3.0.0
- Conclusion: don't install laravel/scout 3.0.x-dev
- Conclusion: remove illuminate/bus v5.3.23
- Installation request for laravel/scout ^3.0 -> satisfiable by laravel/scout[3.0.x-dev, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7].
- Conclusion: don't install illuminate/bus v5.3.23
- laravel/scout 3.0.x-dev requires illuminate/bus ~5.4 -> satisfiable by illuminate/bus[5.4.x-dev, 5.5.x-dev, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.9].
- Can only install one of: illuminate/bus[5.4.x-dev, v5.3.23].
- Can only install one of: illuminate/bus[5.5.x-dev, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.0, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.13, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.17, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.19, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.27, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.9, v5.3.23].
- Installation request for illuminate/bus (locked at v5.3.23) -> satisfiable by illuminate/bus[v5.3.23].
Scout is for be used in version 5.4, So in the file composer.json change the version in the following line:
"laravel/lumen-framework": "5.4.*"
after this just run:
composer dump-autoload
composer update
composer require laravel/scout
and for finish:
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
Well this is the case for Lumen, but if is not your case, Try to update the Laravel version on composer file, and then update before install scout.
I hope this helps.
You just need to manually copy and create the config file:
from:
/vendor/laravel/scout/config/scout.php
to:
/config/scout.php
This can happen if you have cached your config using artisan config:cache. To solve it clear the config cache (by running artisan config:cache again). Then retry the vendor publish command.