當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。