Is there something I need to namespace in, like
use App\Redirect;
?
Oh w8 I think I'm on to something. Just like outside Laravel, when return is used the script returns to the page that has called the function
yea, when return is called the script ends
protected function create(Request $request)
{
$comment = new Comment();
$comment->user_id = Auth::user()->id;
$comment->content => nl2br($request->input('content'));
$comment->save();
return redirect()->route('/blog');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community