当前位置: 首页>>代码示例>>PHP>>正文


PHP Album::all方法代码示例

本文整理汇总了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));
 }
开发者ID:straho99,项目名称:NeshtoShantavo,代码行数:27,代码来源:AdminController.php

示例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);
 }
开发者ID:bandjam,项目名称:site-base,代码行数:9,代码来源:AuthController.php

示例3: gallery

 public function gallery()
 {
     $album = Album::all();
     return View::make('web.album')->with('album', $album);
 }
开发者ID:jamalapriadi,项目名称:sia,代码行数:5,代码来源:WebController.php

示例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 
}
开发者ID:stealthrob,项目名称:Dangerous_Eagle,代码行数:31,代码来源:track.php

示例5: collectoinAlbumCount

 public function collectoinAlbumCount()
 {
     $collection = Album::all();
     echo $collection->count();
 }
开发者ID:nattaphat,项目名称:cuse2,代码行数:5,代码来源:AlbumController.php

示例6: editAlbums

 public function editAlbums()
 {
     $albums = Album::all();
     $songs = Song::all();
     return View::make('albums.edit')->with('albums', $albums)->with('songs', $songs);
 }
开发者ID:kylehagler,项目名称:CHP,代码行数:6,代码来源:AlbumsController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $album = Album::all();
     return View::make('album.index')->with('album', $album);
 }
开发者ID:jamalapriadi,项目名称:sia,代码行数:10,代码来源:AlbumController.php


注:本文中的Album::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。