Laravel重定向时没有消息错误

I am getting NoMessages error while redirecting to a page.

add.blade.php
@extends('layout.app')
@section('content')
{!! Form::open(['action' => 'AddluggageController@addconfirm','method'=>'POST']) !!}
<div class="form-group row">
    <div class="col-4">
        <h5 class="col-12"><b> Passenger Info</b> </h5> 
        <div class="col-12">
            {{form::label('name'), 'Name'}} 
            {{form::text('name','',['class'=>'form-control '])}} <br><br>
        </div>
        <div class="col-12">
            {{form::label('phone'), 'Phone'}} 
            {{form::text('phone','',['class'=>'form-control '])}}
        </div>
    </div>
sni</div>
    {!! Form::close() !!}
@endsection

AddluggageController.php

    public function addconfirm(){
     return redirect('/addsuccess')->with('success', 'Saved Successfully');
    }

web.php

Route::post('/addconfirm', 'AddluggageController@addconfirm');

when I redirect it gives me

MethodNotAllowedHttpException

No message

查看全部
dth96108
dth96108
2018/06/09 10:26
  • laravel
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复