/** * Display a listing of the resource. * * @return Response */ public function index() { $artists = Artist::get()->all(); $artists = Artist::paginate(15); return view('artists.index', compact('artists')); //compact hace un arreglo }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $artist = Artist::get(); return view('artist.index', compact('artist')); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $artists = Artist::get()->all(); return view('tracks.create', compact('tracks', 'artists')); }