-1

I think get/post visit Controller

Route::match(['get','post']. '{Controller}/{method}','$Controller\$Controller_Controller@$method');

But this is error;

How to I localhos/website/User/login ,go to find Controllers/User/User_Controller@login?

Josip Ivic
  • 3,639
  • 9
  • 39
  • 57
麦志坤
  • 117
  • 1
  • 9

2 Answers2

0

I thing you are searching for this

Route::get("/my/path", "MyController@myMethod");
Route::post("/my/path", "MyController@myMethod");

Or you can use this Route::resource

Community
  • 1
  • 1
Denis
  • 400
  • 1
  • 12
0

Sorry,my question maybe unclear,by the view i can a one route to find all view ,resource :

Route::get('/{pac}/{menthod}',function($pac,$method){
$url = $pac . "." . $method;
return view($url);
});

but the controller

i try

//this is error
Route::match(['get','post'],'Controoler/{Controller}/{method}',$Controller ."@". $method);

or

//but the return a string to view  
Route::match(['get','post'].'{Controller}/{method}',function($Controller,$method){
    $url = $controller . "@" . $method;
    return $url;
});
麦志坤
  • 117
  • 1
  • 9