I'm new to laravel. When I try to generate a form, the problem occurred. My route
Route::get('post/add', "Post1Controller@add");
Route::post('post/store', "Post1Controller@store");
My Post1Controller
function add()
{
return view('post/create');
}
function store(Request $request)
{
echo "Had file";}
My form
{!! Form::open(['url'=> 'post/store','method'=>'POST', 'files'=> true]) !!}
<div class="form-group">
{!! Form::file('image', ['class' => 'form-control'])!!}
</div>
<div class="form-group">
{!! Form::text('title', '', ['class' => 'form-control', 'placeholder' => 'Title in here'])!!}
</div>
<div class="form-group">
{!!form::textarea('content','',['class'=> 'form-control', 'placeholder'=> 'Text in here'])!!}
</div>
<div class="form-group">
{!! Form::submit('Add', ['name'=>'sm-add', 'class' => 'btn btn-danger'])!!}
</div>
{!! Form::close() !!}`enter code here`
My issue: The GET method is not supported for this route. Supported methods: POST. Thank you for your support.