Having a strange problem with my laravel 5.2 build, I\'m trying to send data from a form to my database and for some reason an error keeps being thrown on submit which states \"
No data is passed to the controller when you post to a route. Instead, you access the data through the Request
object by injecting it into the method, or by using the Request::
or Input::
facades.
protected function postStatus(Illuminate\Http\Request $request)
{
$data = $request->all();
return Posts::create([
'user_name' => $data['user_name'],
'body' => $data['body'],
'photo' => $data['photo'],
'visibility' => $data['visibility'],
]);
}