안녕하세요 저는 laravel 프레임 워크에 익숙하지 않아 컨트롤러에서 특정 메서드를 호출 할 때 문제가있는 것처럼 보입니다.컨트롤러 메서드 호출
여기까지 제가 한 것입니다.
내가 컨트롤러 경로 구성한 :
http://localhost:8585/RestPHP/public/users/get_index
http://localhost:8585/RestPHP/public/users/get_index
:
Route::controller('users', 'UserController');
class UserController extends BaseController{
public $restful = true;
public function get_index($id = null)
{
$ceva = new Model();
return Response::json($ceva);
}
public function get_index2()
{
return "something";
}
}
ASP.NET MVC I의 배경으로부터 오는 것은 이런 각각의 메소드를 호출하는 것으로 그러나 예외가 발견되지 않는 컨트롤러 메소드가 발생합니다.
그 자체로 get_index 메서드를 얻는 방법을 알고있는 것처럼 보입니다.
나는 호출하는 경우 :
http://localhost:8585/RestPHP/public/users/
는 내가 필요로하는
가 어떻게 각각의 방법을 호출 할 수 있습니다 내 json으로 repsonse를 얻을?
Laravel 3 - Restful Controllers (Restful Controllers) (https://tutsplus.com/lesson/restful-controllers/)의 편안한 컨트롤러에 대해이 강의를 시청할 것을 권합니다. @JeffreyWay – Altrim