Support the ongoing development of →
API Routing
Last updated 1 year ago.

Thank you very much, it solved itself.

Route::pattern ( 'method', '[a-z,_]+' );

Route::get('myclass/{method}', [App\Http\Controllers\Myclass::class, 'invoker']);

public function invoker($methodname){

if( method_exists($this, $methodname)){

  return $this->$methodname();

} else {

  return ["result"=>"error","description"=>"no methods"];



The display will disappear from the route list, but it may be secure the other way around. I'll try this for the time being as level 1.


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.