Can you create a route directly to a class method?
As a Laravel beginner I could not find how to create a route to a specific method of a class. The documentation mention the use of a string, but does explain what the format of the parameter. I tried something like this:
If you want to use a complete different directory or location, you need to change the RouteServiceProvider as well, I can give you an example on that as well if it is necessary. These changes might be too advanced for you!
A new controller can go in app/http/Controllers. But when I saw an example of the action parameter with a string I thought it could work without an extra controller. The only thing the controller would do is create an instance of the class I use and invoke the method.
Some background: this is to migrate an existing application to Laravel. The first step is to embed it completely in a Laravel application with as little changes as possible. When that is working the new version can be used.
The next steps are then to migrate functions one by one from the old version to the new.
@bobbybouwmann: for my own namespace I expect a mapping in RouteServiceProvider::map is required. By the way, that map method looks a bit hacky to me, requiring a different file directly inside a class method...
You can of course register you own namespace in the RouteServiceProvider, but that is up to you. I would go with the simple route and simple create the controllers right now ;)