public function getIndex($id = 'index') { //dd($this->metas); $text = Maintext::find($id); $text = Maintext::where('url', '=', $id)->first(); //dd($text); return view('templates.index')->with('text', $text); }
public function staticPage($url) { $content = Maintext::where('url', $url)->first(); if (!$content) { abort(404); } return view($this->localeDir . 'templates.content', compact('content')); }
public function changer(Request $request) { $article = $request->all(); $text = \App\Maintext::find($article['id']); $text->name = $article['name']; $text->body = $article['body']; $text->en_name = $article['en_name']; $text->en_body = $article['en_body']; $text->save(); return redirect(route('texts')); }