I followed a tutorial on Laravel
and AngularJS
and trying to convert a public function
to laravel 5. The code is this:
public function store()
{
Comment::create(array(
'author' => Input::get('author'),
'text' => Input::get('text')
));
return Response::json(array('success' => true));
}
I converted it with this:
public function store()
{
Comment::create(array(
'author' => Request::get('author'),
'text' => Request::get('text')
));
}
Now, how about the line return Response::json(array('success' => true))
? How can I convert it to Laravel 5? Thank you.