Level 51
you need to add this
<form action="/create" method="post">
{{ csrf_field() }}
....
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi, got above error when I submit My form data.
@extends('layouts.app1')
@section('title')
<h3>Board of Directors</h3>
@endsection
@section('content')
<script type="text/javascript" src="{{ asset('/js/tinymce/tinymce.min.js') }}"></script>
<script type="text/javascript">
tinymce.init({
selector : "textarea",
plugins : ["advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste"],
toolbar : "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
</script>
<form action="/create" method="post">
<div class="form-group">
<textarea name='body'class="form-control">{{ old('body') }}</textarea>
</div>
<input type="submit" name='publish' class="btn btn-success" value = "Publish"/>
<input type="submit" name='save' class="btn btn-default" value = "Save Draft" />
</form>
@endsection
how can I fix this?
solution is this
change PostFormRequest.php as
public function authorize()
{
return true;
}
Please or to participate in this conversation.