public function __construct() { $lang = Session::get('locale'); if ($lang != null) { \App::setLocale($lang); } // $data = []; $styles = Style::all(); Session::put('footerStyle', $styles); // view()->share('footerStyle', $styles); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $styles = Style::all(); $styleArray = []; $styleArray[0] = 'select a style'; foreach ($styles as $style) { $styleArray[$style->id] = $style->name; } $data = ['styleArray' => $styleArray]; return View('Art.create')->with($data); }
public function newArt() { $getEra = Era::all(); foreach ($getEra as $Era) { $eras[$Era->id] = $Era->name; } $getStyle = Style::all(); foreach ($getStyle as $Style) { $styles[$Style->id] = $Style->name; } $getCountry = Country::all(); foreach ($getCountry as $Country) { $countrys[$Country->name] = $Country->name; } return view('art.new', compact('styles', 'eras', 'countrys')); }
public function create() { $styles = Style::all(); return view('auctions.create')->withStyles($styles); }