Mail request does not work Laravel 5

I am trying to submit a form using the post method, but it doesn't seem to work. I have enabled the error debugging feature, but so far the error is not displayed. After submitting the form, the same page loads without any errors. This is my route

Route::post('/home' , ['as' => 'store-post' , 'uses'=>'FacebookControllers\PostsController@save']);

And my form

{!!  Form::open(['route'=>'store-post' , 'class'=>'form'])!!}
                   <div class="form-group">
                        <label for="textarea"></label>
                        <textarea class="form-control" rows="5" name="textarea">What on your mind?</textarea>
                   </div>
                   <div class="form-group col-sm-12">
                         <input type="submit" value="Post" class="btn btn-primary pull-right">
                   </div
{!!  Form::close() !!}

This is my controller

class PostsController extends Controller
{
    public function save(PostsRequests $request){

        $input = $request->all();
        $post = new Post();
        $post->user_id = Auth::user()->id;
        $post->content =$input;
        $post->user()->associate(1);
        $post->save();

        /*return redirect('home');*/
        return ('something');
    }
}
0
source share
1 answer

After hours of searching and trying, finally I found a solution. I used my own query class and the path was wrong, so I fixed the path PostsRequestsand now it works.

+1
source

All Articles