/** * Fungsi buat tampilan about us */ public function aboutUs() { $about = About::first(); $gallery = Image::all(); $tipe = Type::all(); return view('FrontEnd.aboutUs', compact('about', 'gallery', 'tipe')); }
/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request) { $this->addData(); $user = Auth::user(); $aboutUs = About::first(); $gallery = Image::all(); return view('admin.about', compact('user', 'aboutUs', 'gallery')); }
public function getAbout(Request $request) { if ($request->input('id') == null) { $news = News::all(); $about = About::first(); return view('home.about')->with(['news' => $news, 'about' => $about]); } else { $item = News::where('id', $request->input('id'))->first(); if ($item == null) { return redirect('about'); } return view('home.news')->with('item', $item); } }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit() { $about = About::first(); return view('admin.about.edit', compact('about', $about)); }
public function postEditAbout(Request $request) { $validator = $this->validatorForAbout($request->all()); if ($validator->fails()) { return redirect()->back()->withErrors($validator->messages())->withInput(); } $about = About::first(); $about->content = $request->input('content'); $about->save(); $msg = "Информация о компании изменена"; return redirect('admin/news')->with('msg', $msg); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function index() { $about = About::first(); return View('admin.about')->with('title', 'Edit About Page')->with('about', $about); }
public function about() { $about = About::first(); $setting = Setting::first(); return view('sites.about', compact('about', 'setting')); }
public function index(Sitemenu $sitemenu) { $this->data['about'] = About::first(); $this->data['meta'] = $sitemenu->getMeta('about'); return view('pages.about.index', $this->data); }