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!
The Laravel portal for problem solving, knowledge sharing and community building.
The community