Laravel 5 get route prefix in controller method
Request()->route()->getPrefix()
You can do this two way
Type-hinting Request
in method
public function index(\Illuminate\Http\Request $request){
dd($request->route()->getPrefix());
}
or
public function index(){
dd($this->getRouter()->getCurrentRoute()->getPrefix());
}
I hope this helps.