コード例 #1
0
 /**
  * Delete a project (only when user is the payee)
  * @param $id
  * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
  */
 public function destroy($id)
 {
     $project = Project::whereUserIsPayee()->findOrFail($id);
     $project->delete();
     return response(null, Response::HTTP_NO_CONTENT);
 }