public function gettaluk() { $equipmenttypes = Taluk::where('district_id', Input::get('id'))->orderby('taluk', 'asc')->lists('taluk', 'id'); $out = '<option value="">Select Option</option>'; if ($equipmenttypes) { foreach ($equipmenttypes as $key => $equipmenttype) { $out .= '<option value="' . $key . '">' . $equipmenttype . '</option>'; } } echo $out; }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $data['project'] = $project = Project::find($id); if ($project) { $data['sectors'] = Sector::lists('name', 'id'); $data['states'] = State::lists('state', 'id'); $data['districts'] = District::where('state_id', $data['project']->state_id)->lists('district', 'id'); $data['taluks'] = Taluk::where('district_id', $data['project']->district_id)->lists('taluk', 'id'); $data['cancelbtn'] = Permission::hasPermission('projects.index'); return view('projects.edit', $data); } else { Session::flash($this->danger, Lang::get('ruban.project.notfound')); return Redirect::route('ruban.projects.index'); } }