mpchean
10 months ago

Broke my project after renaming Controller

Posted 10 months ago by mpchean

At one point in the Projects tutorial I renamed my ProjectsController.php to oldProjectsController.php when some of my routing stopped working. I thought it would be a good idea to start clean. I created a new ProjectsController.php using resource. Now however I'm getting the following error when I enter the following route: http://project.test/projects (I'm using Laragon for pretty urls).

 ErrorException (E_WARNING)
include(C:\laragon\www\project\vendor\composer/../../app/Http/Controllers/oldProjectsController.php): failed to open stream: No such file or directory.

The routing only works if there is an oldProjectsController.php. This is my route:

Route::resource('projects', 'ProjectsController');

and this is the top of my ProjectsController.php:

namespace App\Http\Controllers;

use App\Project;
use Illuminate\Http\Request;

// created with php artisan make:controller ProjectsController -r -m Project

class ProjectsController extends Controller

Please sign in or create an account to participate in this conversation.