Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.1 remove controller

Tags:

I have simple question on Laravel 5.1. I have created a controller using php artisan command:

php artisan make:controller PageSettings 

However it was mistake, because I really wanted to create this controller in Admin folder like this:

php artisan make:controller Admin/PageSettings 

Now I want to get rid of my old PageSettings controller. Is it ok just to delete my old PageSettings.php manualy? Or there is something more what needs to be done?

like image 621
Fusion Avatar asked Jan 09 '16 11:01

Fusion


1 Answers

If you only created it and found that you did it wrong, you can manually remove the file and that's it. However when you already added routes to this controller in routes.php you should remove them from routes.php file or alter the file to reflect your new controller.

like image 137
Marcin Nabiałek Avatar answered Oct 10 '22 15:10

Marcin Nabiałek