Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 347 Bytes

route-controller-methods.md

File metadata and controls

20 lines (17 loc) · 347 Bytes

Magento Style Routing

Path-based lazy controller routing. lol.

<?php
Route::any("{controller}/{method}", "BaseController@callController");
<?php
public function callController(string $controller, string $method)
{
  try{
    return app()->call("{$controller}@{$method}");
  }catch(\Throwable $e){
    abort(404);
  }
}