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')); }