I'm designing a module, to take in a "notification request", render it, and deliver it over email or sms. After a few hacky revisions, I realized, that I'm basically doing a request, to a controller, passing parameters, and rendering a view.
I'm planning on doing something like
App\Sms\Controllers\UserController.php
. In it I'll have getNewUser($user)
. I will capture the output of that, and pass it to my SMS API.
My question is, is there something negative I need to be aware of, by subclassing from Illuminate\Routing\Controller.php
?
Some examples I can think of include having to hide/block these routes from being hit via http.
I will call the controller with something like
$request = Request::create('api/items', 'GET', $params);
return Route::dispatch($request)->getContent();