/** * Display a listing of the resource. * * @return Response */ public function index() { if (Auth::user()->is_admin) { $artists = \App\Artist::all(); return view('cantantes.index', compact('artists')); } return redirect('inicio'); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(Studio $studio, Event $event) { $artists = Artist::all()->lists('name', 'id'); $pieces = Piece::lists('title', 'id')->all(); $event->date = $event->starts->format('Y-m-d'); $event->startTimeField = $event->starts->format('H:i'); $event->endTimeField = $event->ends->format('H:i'); return view('admin.studio.events.edit', compact('studio', 'event', 'artists', 'pieces')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $track = Track::find($id); $artists = Artist::all(); return view('tracks.edit', compact('track', 'artists')); }
/** * Display the user add tattoos page * * @return View */ public function tattoosAdd() { $user = Auth::user(); if (!$user->social) { $user->avatar = url('uploads/images/small/' . $user->avatar); } $artists = Artist::all(); //if user is artist, load artist profile view if ($user->type == 'artist') { $artist = Artist::where('user_id', $user->id)->first(); $artist->cover = url('uploads/images/large/' . $artist->cover); return view('pages.profile.artist.addtattoo', ['user' => $user, 'artist' => $artist, 'artists' => $artists]); } return view('pages.profile.member.addtattoo', ['user' => $user, 'artists' => $artists]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(Image $image) { $pieces = Piece::lists('title', 'id')->all(); $artists = Artist::all()->lists('name', 'id'); return view('admin.images.edit', compact('image', 'pieces', 'artists')); }