0
嘗試使用Laravel發送一封電子郵件,但不斷收到405錯誤和哎呦頁面顯示時:405錯誤嘗試通過路由器發送電子郵件Laravel
* @param array $others
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
*/
protected function methodNotAllowed(array $others)
{
throw new MethodNotAllowedHttpException($others);
}
的代碼是:
{{ Form::open(array('url' => 'admin/newemail')) }}
// form items
{{ Form::close() }}
而且路線爲:
Route::get('admin/newemail', function()
{
$email = '[email protected]';
$data = array('s' => Input::get('email-heading'));
Mail::send('emails.wereback', $data, function($message) use ($email){
// $message details
});
});
但是,如果我直接到URL管理/ NEWEMAIL它工作正常。
任何幫助?
我會選擇後者,這樣人會不小心訪問'example.com/admin/newemail'併發送一封電子郵件。 – Dencker 2015-02-05 21:38:19
啊是的!我腦海中的邏輯思考不足。郵政是我所需要的不會得到的...... :) – Lovelock 2015-02-05 21:39:03