Skip to content

Instantly share code, notes, and snippets.

@event15
Created March 25, 2017 17:40
Show Gist options
  • Save event15/f68d0330b6a7579774308dbf0286a66e to your computer and use it in GitHub Desktop.
Save event15/f68d0330b6a7579774308dbf0286a66e to your computer and use it in GitHub Desktop.
public function store(Request $request)
{
$this->validate($request, [
'name' => 'required',
]);
$request->user()->projects()->create([
'name' => strip_tags($request->input('name')),
]);
return redirect('/projects');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment