When I'm working in my Laravel project it won't change anymore. I've already
restarted wamp and updated with php laravel, but it keeps loading my stuff from a couple of days ago?
What am I doing wrong here?
Run composer dump-autoload
It regenerates the list of all classes that need to be included in the project.
This sort of problem caught me out early on when I added classes into my laravel applications.
Related
I am new to laravel and I am wondering how all these default templates are upgraded when a new minor(!) laravel version was released.
Let's say I've installed laravel via:
composer create-project laravel/laravel example-app
This pulls in a lot of files with basic templates to get started.
Now when I run composer outdated it shows me which versions are currently out of date. I guess that composer update will only update the vendor files, but not the files inside my project itself. But what if those template files were changed on an update? How do I get to know this change?
The same question applies to packages like sanctum, fortify and jetstream. How do I manage those updates? Or aren't the template files ever being corrected between minor versions?
I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0 for the upgrade, including removing Illuminate\Foundation\Providers\ArtisanServiceProvider and Illuminate\Routing\ControllerServiceProvider from the config/app.php file (I am stressing this point, as googling for this issue has suggested this in every response).
Despite this, I am still getting this error when I run composer cache:clear
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Illuminate\Routing\ControllerServiceProvider' not found error
and see this error in my browser:
FatalThrowableError in ProviderRepository.php line 146:
Class 'Illuminate\Routing\ControllerServiceProvider' not found
Thinking that perhaps references to these classes were being cached, I checked bootstrap/cache/services.json and removed the references from there as well and then ran composer dump-autoload but I am still getting this error.
I also made sure to copy over example config/app.php from Laravel 5.2 clean install example here: https://raw.githubusercontent.com/ziyed/Laravel-5.2/master/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
I have read through the similar threads on StackOverflow and Laracast and tried tried to use the advice contained inside, but nothing seems to work.
Any help would be greatly appreciated. For reference, my dev setup is running on a local XAMPP stack under a Windows 10 OS. The other environments are remote, using a traditional LAMP stack with Amazon Linux 2. I was trying to do the upgrade locally.
Illuminate\Routing\ControllerServiceProvider is not present anymore.
When I recently had to upgrade the same versions as you, I had to run composer update before and after removing Illuminate\Routing\ControllerServiceProvider::class and Illuminate\Foundation\Providers\ArtisanServiceProvider::class to make it work. Also worth to mention you need to clear bootstrap/cache. It worked for me.
Edit: i noticed now you tried the last step partially as well. You can remove all php files from cache.
I am closing this question, not because I found an answer, but because continuing down this path just didn't pass a cost/benefit analysis. After upgrading to 5.2, the next upgrade would be 5.3, and the breaking changes between 5.2 to 5.3 is a lot higher than between 5.1 to 5.2. After some thought, it was obvious that the better approach would be a fresh install on my target version, and then start porting over each module in my project by copying over the views, updating the routing, and making changes to the controllers and middleware as needed.
Or just using Laravel Shift.
Thank you to everyone who chimed in with suggestions!
I have started my first laravel project after I got a recommendation to use a framework.
I have started watching some tutorials and am trying to follow along, but in all the tutorials there is an assets folder inside resources with for example a _variables file. I don't have this folder, I guess it because I am using laravel version 7x and the tutorials are using an older version? I also thought bootstrap was provided with laravel, but it does not work. Have I done anything wrong or does everything seem right? I have followed a tutorial step-by-step from the start and used npm install & npm run dev, but the css file it creates is empty. I have also tried to start over with a new project, but the same happens!
Any help is appreciated!
Are you already run composer require laravel/ui? Laravel 7 has frontend scaffolding. You can read the documentation's about frontend scaffolding here https://laravel.com/docs/7.x/frontend.
Hope this help.
I am working on a project which is in Laravel 5.8, and recently, I upgraded it to Laravel 6.0 with its packages dependencies versions too. The project was running fine. But, today, I update the composer via composer update, and it upgraded to Laravel 6.2. After that, I faced an error:
App\Http\Controllers\Auth\ConfirmPasswordController does not exist
Then I installed a fresh Laravel-6.2 and generated basic scaffolding via php artisan ui vue, then, generated login/registration scaffolding via php artisan ui vue --auth. After that, I found ConfirmPasswordController.Then, I manually created ConfirmPasswordController in my running project and copied all of the codes from ConfirmPasswordController to my manually created ConfirmPasswordController. Then, the error has gone. Although I did not face any error related to this. But, I am confused about my approach. Is it right way what I did? Or it has a better way to solve this problem. I am confused about, If I face many issues for php artisan ui vue --auth in the next time. Would someone suggest me the right process, what should I do?
Laravel made the following additions and modifications from versions v6.0.0 to v6.2.0.
A app/Http/Controllers/Auth/ConfirmPasswordController.php
M app/Http/Controllers/Auth/ForgotPasswordController.php
M app/Http/Controllers/Auth/ResetPasswordController.php
M app/Http/Kernel.php
M config/auth.php
M resources/lang/en/validation.php
Please make sure these changes are in your Laravel instance though it sounds like they now are. You can see the diff of v6.0.0 to v6.2.0 here. If you need to see v5.8.0 changes through 6.2.0, please go here.
When upgrading, you will need to copy it from https://github.com/laravel/laravel/blob/master/app/Http/Controllers/Auth/ConfirmPasswordController.php
This is known, reference https://github.com/laravel/ui/pull/36#issuecomment-539921924.
I switched from Symfony to CodeIgniter and I would like it to stay up-to-date with the framework.
I understand that you can easely install and update all kind of packages, I know how to do it as I did it over and over again with Symfony.
I already set $config['composer_autoload'] = TRUE; in application/config/config.php. (Thanks to a lot of other SO questions)
My problem: Composer seems to update all the packages fine, but not the framework itself. Is it possible or am I doomed to do it manually?
EDIT
Please consider using CodeIgniter 4, which is made to be used with Composer from the start. CodeIgniter 3 is old and should only be used on legacy projects.
You can update your codeigniter using composer by below method:
$ cd /path/to/codeigniter
$ composer update
Here you can get more info about this
CodeIgniter hasn't been made as a composer packageā¦ except that someone eventually did it anyway!
It is possible to keep CodeIgniter up-to-date by installing it throught composer in the first place. The project is hosted on GitHub.
In order to use it, it's quite easy: composer create-project kenjis/codeigniter-composer-installer codeigniter should do the trick!