Я получаю Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

В настоящее время я пытаюсь добавить форму на мою домашнюю страницу, где пользователь может оставить комментарий, а затем включить вывод этой формы ниже, чтобы посетители могли видеть все сообщения.
В настоящее время я получаю следующую ошибку при отправке комментария:

Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

Вот контроллер:

 <?php

use Desk\Forms\MessageForm;
use Desk\Records\MessageRecord;
use Desk\Repositories\MessageRepository;

class MessageController extends BaseController
{

protected $messageForm;

public function __construct(MessageForm $messageForm, MessageRepository $messageRepository,
MessageRecord $messageRecord)
{
$this->messageForm = $messageForm;
$this->messageRepository = $messageRepository;
$this->messageRecord = $messageRecord;
}

/**
* Display a listing of the resource.
* GET /messages
*
* @return Response
*/
public function create()
{
return View::make('comments.create');
}public function show($comment)
{
$message_id = $this->messageRepository->find($comment);
return View::make('comments.show')->with('comment', $message_id);
}

/**
* Store a newly created resource in storage.
* POST /messaages
*
* @return Response
*/
public function store()
{
$data = Input::all() ;
$this->messageForm->validate($data);

$messageRecord = new MessageRecord;
$messageRecord->comment = $data['comment'];

Return "Comment created";
}
}

Вот маршрут:

Route::resource('/message', 'MessageController');

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …