public function index(Request $request)
 {
     if ($request->user()->is_admin == 1) {
         $albums = Album::all();
     } else {
         $albums = $request->user()->albums;
     }
     return view('album.list', ['albums' => $albums]);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function dashboard()
 {
     //
     $usercount = User::all()->count();
     $activecount = User::where('status', '=', 1)->count();
     $imagescount = Images::all()->count();
     $albumcount = Album::all()->count();
     return view('admin.dashboard')->with(['imagescount' => $imagescount, 'albumcount' => $albumcount, 'usercount' => $usercount, 'activeuser' => $activecount, 'fname' => 'Muhammad Adeel ']);
 }
 public function viewAlbumList()
 {
     //showing all the albums list
     if (Auth::user()) {
         $Albums = Album::all();
         return view('admin.album')->with('albums', $Albums);
     } else {
         return redirect(route('login'));
     }
 }
 /**
  * To show albums
  */
 public function index()
 {
     $data = [];
     foreach (Album::all() as $key => $album) {
         $temp = $album;
         $temp['artists'] = $album->artists;
         $data[] = $temp;
     }
     return $data;
 }
示例#5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //Traz as informações do facebook salvas
     $user = Auth::user();
     // $facebookData = $user->facebookData;
     $perfil = $user->perfil;
     $ongs = $user->ongs;
     $empresas = $user->empresas;
     $albums = Album::all();
     return view('album.list', compact('albums', 'perfil', 'ongs', 'empresas'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $albums = Album::all();
     return view('albums.index', compact('albums'));
 }
示例#7
0
 public function invite(Request $request)
 {
     return view('user.invite', ['albums' => Album::all()]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $data['album'] = Album::all();
     return view('admin.album', $data);
 }
示例#9
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $count = DB::table('albums')->where('copyright_date', 'like', '%2005%')->count();
     $albums = Album::all();
     return view('albums.index', compact('albums', 'count'));
 }