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


PHP Artist::where方法代码示例

本文整理汇总了PHP中Artist::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Artist::where方法的具体用法?PHP Artist::where怎么用?PHP Artist::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Artist的用法示例。


在下文中一共展示了Artist::where方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getArtist

 public function getArtist($name)
 {
     $artist = Artist::where('permalink', '=', $name);
     $artist = $artist->first();
     $inside_image = Media::find($artist->inside_image);
     return View::make('artists.single')->with('artist', $artist)->with('inside_image', $inside_image);
 }
开发者ID:mlauren,项目名称:midway-gallery,代码行数:7,代码来源:ArtistController.php

示例2: afterUpdate

 public function afterUpdate($id, $data = null)
 {
     $artist = Artist::where('artistName', '=', $data['artist'])->where('ownerId', '=', Auth::user()->_id)->first();
     if ($artist == null) {
         $artist = new Artist();
     }
     $artist->artistName = $data['artist'];
     $artist->ownerId = Auth::user()->_id;
     $artist->ownerName = Auth::user()->firstname . ' ' . Auth::user()->lastname;
     $artist->save();
     return $id;
 }
开发者ID:awidarto,项目名称:tmadminflat,代码行数:12,代码来源:AlbumController.php

示例3: show

 public function show()
 {
     if ($this->params()->name) {
         $this->artist = Artist::where(['name' => $this->params()->name])->first();
     } else {
         $this->artist = Artist::find($this->params()->id);
     }
     if (!$this->artist) {
         $this->redirectTo(['#create', 'name' => $this->params()->name]);
     } else {
         $this->redirectTo(['wiki#show', 'title' => $this->artist->name]);
     }
 }
开发者ID:JCQS04,项目名称:myimouto,代码行数:13,代码来源:ArtistController.php

示例4: api_get_artists

 public function api_get_artists()
 {
     Paginator::setPageName('page');
     $artists = Artist::where('active', '=', 1)->paginate(PAGE_SIZE);
     return $artists;
 }
开发者ID:ariftechnologies,项目名称:musicStore,代码行数:6,代码来源:MusicStoreController.php

示例5: show

 public function show()
 {
     if (!$this->params()->title) {
         $this->render(['text' => "no title specified"]);
         return;
     }
     $this->title = $this->params()->title;
     $this->page = WikiPage::find_page($this->params()->title, $this->params()->version);
     $this->posts = Post::find_by_tag_join($this->params()->title, ['limit' => 8])->select(function ($x) {
         return $x->can_be_seen_by(current_user());
     });
     $this->artist = Artist::where(['name' => $this->params()->title])->first();
     $this->tag = Tag::where(['name' => $this->params()->title])->first();
     $this->set_title(str_replace("_", " ", $this->params()->title));
 }
开发者ID:JCQS04,项目名称:myimouto,代码行数:15,代码来源:WikiController.php

示例6: setGroupName

 public function setGroupName($name)
 {
     if (!$name) {
         $this->group_id = null;
     } else {
         $this->group_id = Artist::where(['name' => $name])->firstOrCreate()->id;
     }
 }
开发者ID:JCQS04,项目名称:myimouto,代码行数:8,代码来源:Artist.php


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