/** * Display the site meta information in an editable form. * The form will be pre-populated if there is one already * in the system. * * @return Response */ public function index() { $mainMeta = MainMeta::all(); if (count($mainMeta) == 0) { return view('main_meta.create'); } $mainMeta = MainMeta::first(); return view('main_meta.edit', compact('mainMeta')); }
/** * Create and download main meta data as CSV file. */ public function getMainMetaData() { $mainMeta = MainMeta::all(); $this->createCsv($mainMeta, 'main_meta'); }