コード例 #1
0
 public function destroy($id)
 {
     Project::destroy($id);
 }
コード例 #2
0
 public function callByUser(Request $request, $callId, $userId)
 {
     $call = Call::find($callId);
     $resources = Resource::where('user_id', '=', $userId)->where('call_id', '=', $callId)->get();
     $projects = Project::where('user_id', '=', $userId)->where('call_id', '=', $callId)->get();
     $allow_to_apply = count($resources) > 0;
     return array('call' => $call, 'user_id' => $userId, 'user_resources' => $resources, 'user_projects' => $projects, 'allow_to_apply_projects' => $allow_to_apply);
 }