Facing an error stated as in the title of this article, it is simply an error which can be solved easily. But to be more specific on discussing how to solve the error, first of all, the real situation which become the trigger for the error to be generated will be explained in detail. The error is in the form of an error message which is printed ‘ReflectionException ControllerName::MethodName() does not exist’. Below is the image depicting the error message stated before :

Since accessing a certain URL of the web application for an example where it is shown in the above, ‘/role/create’, it is actually mapped to a certain controller file defined in a route file configuration named web.php located in routes folder for Laravel 5.3, that definition itself must be checked. The location of the file can be described into the following tree format as follows :

So, after checking the content of the route file configuration, there is a URL, ‘/role/create’ where that URL itself is mapped to a method defined inside a controller. The controller is ‘RoleController’ and the method which is used is the ‘create’ method.

To be able to execute the web application by accessing the URL address, it is important to make sure the target of the destination which is defined in the route file configuration which is responsible for further processing. And in the above context, it is delegated to a method name create in a controller named ‘RoleController’. Obviously, the controller itself is actually a file named RoleController.php and it is representing the controller named ‘RoleController’.

As it can be seen from the above snippet code extracted from a file named RoleController.php used to define the controller named RoleController, there is no method named ‘create’ which has already defined. So, in order to solve the problem, just create a new method inside the class Controller as shown below :