public function getShowLink($id) { $link = Link::find($id); if (isset($link->gov_id)) { $gov = Gov::findOrFail($link->gov_id); $gov = $gov->name; } else { $gov = "ไม่ได้กำหนดหน่วยงาน"; } $columns = Schema::getColumnListing('links'); return View::make('admin.show_link')->with('link', $link)->with('columns', $columns)->with('govName', $gov); }
public function getGovernmentLink($id) { $gov = Gov::find($id); $this->breadcrumbs->push('กระทรวง', URL::to('/governments')); $this->breadcrumbs->push($gov->ministry, URL::to('/government/' . $id . '/show')); $this->breadcrumbs->push($gov->name, URL::to('/government/link/' . $id . '/show')); $this->breadcrumbs->generate(); return View::make('home.government_link')->with('gov', $gov); }
public function getShowGov($id) { $gov = Gov::find($id); $columns = Schema::getColumnListing('gov'); return View::make('admin.show_gov')->with('gov', $gov)->with('columns', $columns); }