I am working in Laravel 5.0 app.
I have created route group like below,
Route::group([\'prefix\' => \'expert\'], function () {
Route::get(\'
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.
Try this
$request = Request();
$request->route()->group;
Request()->route()->getPrefix()