/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $product = (new \App\Product())->find($id);
     $sections = (new \App\Section())->orderBy('id')->get();
     $dropdown_sections = dropdown_generator($sections, ['id' => 'title']);
     return view('panel.products.edit', compact('dropdown_sections', 'product'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $link = (new \App\Link())->findOrFail($id);
     $links = (new \App\Link())->all();
     $dropdown_links = dropdown_generator($links, ['id' => 'title'], ['0' => 'No Parent']);
     return view('panel.configs.links.edit', compact('links', 'link', 'dropdown_links'));
 }
 public function edit($id)
 {
     $page = (new \App\Page())->find($id);
     $pages = (new \App\Page())->all();
     $dropdown_pages = dropdown_generator($pages, ['id' => 'title'], ['0' => 'No Parent']);
     return view('panel.pages.edit', compact('page', 'dropdown_pages'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $section = (new \App\Section())->find($id);
     $pages = (new \App\Page())->orderBy('id')->get();
     $dropdown_pages = dropdown_generator($pages, ['id' => 'title']);
     $sections = (new \App\Section())->where('parent_id', '0')->orderBy('id')->get();
     $dropdown_sections = dropdown_generator($sections, ['id' => 'title'], ['0' => 'No Parent']);
     return view('panel.sections.edit', compact('dropdown_pages', 'dropdown_sections', 'section'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //Getting the link to be edited so the form-model binder can pre-populate the form fields with old values
     $link = \App\Link::find($id);
     //Getting all parent links
     $links = (new \App\Link())->where('parent_id', '=', '0')->get();
     //Generating the dropdown list for parent pages as follows ['0' => 'No Parent', '1' => 'First Parent']
     $dropdown_links = dropdown_generator($links, ['id' => 'title'], ['0' => 'No Parent']);
     return view('panel.links.edit', compact('link', 'dropdown_links'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $committee = (new \App\Committee())->findOrFail($id);
     $dropdown_icons = dropdown_generator((new \App\Icon())->all(), ["id" => "title"]);
     return view('panel.configs.committees.edit', compact('committee', 'dropdown_icons'));
 }