Laravel по-русски

Русское сообщество разработки на PHP-фреймворке Laravel.

Ты не вошёл. Вход тут.

#26 Laravel 4 » [L4] RESTful при POST запросe вызывается Index() вместо Store() » 22.09.2013 15:59:24

flatter
Ответов: 1

Routes:

	Route::resource('models', 'ApiV1ModelController');

В ApiV1ModelController

class ApiV1ModelController extends \BaseController {
	
	public $restful = true;
 
	public function index()
	{
		return Response::json(array(
			'error' => false,
			'message' => 'Список',
			),
			200
		);
	}

	/**
	* Display the specified resource.
	*
	* @param  int  $id
	* @return Response
	*/
	public function show($id)
	{
		return Response::json(array(
			'error' => false,
			'model_id' => 1,
			),
			200
		);
	}
	/**
	* Remove the specified resource from storage.
	*
	* @param  int  $id
	* @return Response
	*/
	public function destroy($id)
	{

		return Response::json(array(
			'error' => false,
			'message' => 'удалили'
			),
			200
		);
	}

	/**
	* Update the specified resource in storage.
	*
	* @param  int  $id
	* @return Response
	*/
	public function update($id)
	{

		return Response::json(array(
			'error' => false,
			'message' => 'обновили'
			),
			200
		);
	}

Проверяю из Хрома Advanced Rest Client Application
Подскажите куда копнуть?

Подвал раздела