public function edit($id) { $necessidadeId = \App\Necessidade::lists('descricao', 'id'); $statustarefaId = \App\StatusTarefa::lists('descricao', 'id'); $tipostarefaId = \App\TiposTarefa::lists('descricao', 'id'); $userId = \App\User::lists('name', 'id'); $tarefa = $this->tarefa->find($id); return view('tarefas.edit', compact('tarefa', 'necessidadeId', 'statustarefaId', 'tipostarefaId', 'userId')); }