本文整理汇总了PHP中Album::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Album::all方法的具体用法?PHP Album::all怎么用?PHP Album::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Album
的用法示例。
在下文中一共展示了Album::all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIndex
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));
}
示例2: getAlbums
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);
}
示例3: gallery
public function gallery()
{
$album = Album::all();
return View::make('web.album')->with('album', $album);
}
示例4: foreach
}
?>
<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
}
示例5: collectoinAlbumCount
public function collectoinAlbumCount()
{
$collection = Album::all();
echo $collection->count();
}
示例6: editAlbums
public function editAlbums()
{
$albums = Album::all();
$songs = Song::all();
return View::make('albums.edit')->with('albums', $albums)->with('songs', $songs);
}
示例7: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$album = Album::all();
return View::make('album.index')->with('album', $album);
}