public function getIndex() { if (Auth::guest() || Auth::user()->isAdmin == 0) { return Redirect::secure('/'); } // layouts variables $this->layout->title = 'Админ панел | Нещо Шантаво'; $this->layout->canonical = 'https://neshto.shantavo.com/admin/'; $this->layout->robots = 'noindex,nofollow,noodp,noydir'; $users = count(User::all()); $admins = count(User::where('isAdmin', ">", 0)->get()); $categories = count(Category::all()); $albums = count(Album::all()); $votes = count(DB::table('votes')->get()); $pictures = count(Picture::all()); $pictureSize = 0; foreach (Picture::all() as $p) { $pictureSize += $p->size; } // get disqus stats include app_path() . '/config/_disqus.php'; $disqus = new DisqusAPI(getDisqusKey()); $disqus->setSecure(false); $comments = $disqus->posts->list(array('forum' => 'shantavo')); // nesting the view into the layout $this->layout->nest('content', 'admin.index', array('users' => $users, 'admins' => $admins, 'votes' => $votes, 'categories' => $categories, 'albums' => $albums, 'pictures' => $pictures, 'pictureSize' => $pictureSize, 'comments' => $comments)); }
function getAlbums($artistID) { $album = new Album($this->db); //$album->getById(1); $list = array_map(array($album, 'cast'), $album->all()); //$album->getByName('Book the First'); //$album->showDataInJSON($album->cast()); echo json_encode($list); }
public function gallery() { $album = Album::all(); return View::make('web.album')->with('album', $album); }
} ?> <label for="name">Nombre</label> <br> <input type="text" id="name" name="name" <?php echo "value='{$track->Name}'"; ?> /> <br /> <br> <label for="album">Album</label> <div class="form-group"> <select id="lunchBegins" class="selectpicker" data-live-search="true" data-live-search-style="begins" title="Please select an album..."> <?php foreach (Album::all(10000) as $album) { ?> <br> <option style="width: 200px;" <?php echo "value='{$album->AlbumId}'"; ?> <?php echo isset($track->TrackId) && $album->AlbumId == $track->Album->AlbumId ? " selected " : ""; ?> ><?php echo utf8_encode($album->Title . " (" . $album->Artist->Name . ")"); ?> </option> <?php }
public function collectoinAlbumCount() { $collection = Album::all(); echo $collection->count(); }
public function editAlbums() { $albums = Album::all(); $songs = Song::all(); return View::make('albums.edit')->with('albums', $albums)->with('songs', $songs); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $album = Album::all(); return View::make('album.index')->with('album', $album); }