I am in the process of learning Laravel, currently, I have a Template/Framework installed on the server and it uses the Illuminate framework? I have read that Laravel has depreciated that package with Laravel.
What is the process of updating an existing template from Illuminate to the more current Collective HTML?
When I try it breaks the pages existing. I have tried the following but it does not seem to help.
Switching from Illuminate\Html to Collective\Html, Class 'Illuminate\Html\HtmlServiceProvider' not found
I solved this by removing a duplicate Illuminate statement in the config/app.php as hinted at by Rob Fonseca.
Related
This is regarding Laravel and I am still pretty new to the framework. I recently updated my Laravel to 5.4. And I am running into the following error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::share()
Some investigation landed me on one of my vendor module 'Way' is still call share(), which is no longer supported. I did realize that singleton() is the preferred way, but should I even touch the vendor files? Should composer update the vendor Modules as well (especially Way since it is one of the core module)?
Any tips will be greatly appreciated!
Thanks.
laravel 5.4 share has been removed. You will have to use the singleton instead.
See this
https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736
I was able to fix it for now by adjusting the way generator line in composer.json to:
"way/generators": "dev-master"
The library was updated but it is just not included in the composer update.
Just want to post the answer here in case anyone is running into similar issue.
This library does not have support for Laravel 5.4 .
Author referred other library : laracasts/generators. Both the packages are managed by same author.
Check below link : https://github.com/JeffreyWay/Laravel-4-Generators#laravel-5
I'm trying to upgrade from 4.2 to 5 (and then actually upgraded to 5.1) but I'm having major problems with sentry
I followed instructions to add sentry to L5 here:
How can I use sentry with laravel 5?
With no luck.
Where I'm basically stuck is I got this on my controller:
$user = User::find(Sentry::getUser()->id);
When I try to view the page I get:
Trying to get property of non-object
So it seems it's simply not working.
I've tried multiple ways to get it to work, another one being:
https://cartalyst.com/manual/sentry/2.1#migrations
migration:
php artisan migrate --package=cartalyst/sentry
doesn't work with it though, as I understand this was removed. I really don't know could that help me with any way? Not very knowledgeable with this :)
Original app is not coded by me so I have not integrated the sentry in first place so I might be missing something obvious.
I was developing REST API's in Laravel5 and now I am moving same project to Lumen due to speed issue.
The problem is,I am using "vsmoraes/laravel-pdf": "1.0.1" in Laravel,Now I want to use the same in Lumen.
How it is possible?
When I am added via composer and trying to access from controller,I am getting following error ,
BindingResolutionException in Container.php line 785:
Target [Vsmoraes\Pdf\Pdf] is not instantiable.
Any idea?
Lumen is a micro-framework based on Laravel. As of that, Lumen does not have all the Laravel featuers (by default).
Most of the packages will have to be updated, so they will have much less Laravel-specific dependencies than they're having now.
I want to use wepay PHP sdk in laravel 5 using composer but I didn't found any laravel package for it.
Can you please tell me me how can I do this?
The package is available via packagist.org - unfortunately only as a dev-master branch and with suboptimal autoloading configured (I'm trying to fix that, sent both a patch and opened an issue suggesting they tag their version).
Adding that package is basic Composer action. The classes should be automatically available within Laravel wherever you think you want to use it.
I am receiving the following error when using paginate with Eloquent:
Argument 2 passed to Illuminate\Pagination\Factory::__construct() must be an instance of Illuminate\View\Factory, instance of Illuminate\View\Environment given, called in C:\****\vendor\laravel\framework\src\Illuminate\Pagination\PaginationServiceProvider.php on line 23 and defined
For testing purposes, this is all I have in the method of my controller:
return User::paginate(15);
I'm aware about the upgrade procedure from the docs, but I don't have any of the references mentioned there.
Update:
In my specific case there was a package in the workbench which was requiring Illuminate 4.1 components, I changed to 4.2 in composer.json, removed the vendor dir and composer.lock file, did a composer install, and the error is gone.
These operations were all done within the package folder.
Posted as a comment, but it was the right answer:
Is there any chance you are only requiring some of the Laravel components, and not the entire Laravel framework? If you are only working with some then things like this can get out of whack, especially if not all of your components are updated to 4.2.
I encountered the same issue as you when I updated from 4.1 to 4.2, which in my case I did a composer update on my development environment before pushing and did a pull from my staging. Now the pagination issue doesn't exist in my development but in my staging, so I figured it might be the issue with git pull missed some files, or cache in the views. So I did remove the entire project and do a clean clone from the repository, that seems to fix the problem.
So not fully sure on how you update, but you might want to check that your updated files has been fully applied.
I also ran into this same problem when upgrading from 4.1 to 4.2, but my fix was different to Phil Sturgeon's.
I simply had to remove the bootstrap/compiled.php file located in the root of the Laravel project.