/** * Display a listing of the resource. * * @return Response */ public function index() { $viDes = DesContent::find(1); $enDes = DesContent::find(2); $introduces = AdminLanguage::where('model_name', 'Introduce')->orderBy('position', 'asc')->get(); // dd(LaravelLocalization::setLocale()); return View::make('site.index')->with(compact('viDes', 'enDes', 'introduces')); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id) { $viInput = Input::only('title', 'description'); DesContent::find(1)->update($viInput); $enInput['title'] = Input::get('en_title'); $enInput['description'] = Input::get('en_description'); DesContent::find(2)->update($enInput); return Redirect::action('DesContentController@edit', 1); }