public function destroy($id) { Project::destroy($id); }
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); }