/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create($society) { if (Helpers::perm('admin', $society) or Helpers::perm('edit', $society)) { $data['society'] = Society::find($society); $allopt = Webpage::all(); $data['options'] = array('welcome_page' => 'Mission statement', 'circuit_values' => 'Circuit values', 'circuit_history' => 'Circuit history'); foreach ($allopt as $thisopt) { // if ($thisopt->in_array($data['options'])){ // return $thisopt; // } Remove pages that have already been created } return view('webpages.create', $data); } else { return view('shared.unauthorised'); } }
public function listAction() { return $this->response(Webpage::all()); }