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


PHP Artist::find方法代码示例

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


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

示例1: removeArtist

 public function removeArtist($id)
 {
     $artist = Artist::find($id);
     $name = $artist->name;
     $artist->delete();
     return Redirect::route('account')->with('status', 'alert-success')->with('global', 'You just deleted ' . $name);
 }
开发者ID:mlauren,项目名称:midway-gallery,代码行数:7,代码来源:ArtistController.php

示例2: header

<?php

include 'models.php';
if (isset($_GET['id'])) {
    $a = Artist::find($_GET['id']);
    if ($a->delete()) {
        header("Location: ../index.php");
    }
} else {
    header("Location: ../index.php");
}
开发者ID:dev2me,项目名称:music2.com,代码行数:11,代码来源:borrar_artist.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: artistPage

 /**
  * 艺术家页面
  *
  * @param int $id
  * @return Response
  */
 public function artistPage($id)
 {
     // fetch artist
     $artist = Artist::find($id);
     // collect the total counts
     $total = [];
     foreach ($artist->programs as $pm) {
         empty($total[$pm->dates->year]) and $total[$pm->dates->year] = 0;
         $total[$pm->dates->year]++;
     }
     $total = self::fillChartData($total);
     // TDK
     $title = $artist->name;
     $description = '飞鱼秀歌曲歌手, 飞鱼秀音乐艺人';
     return View::make('music.artist')->with('artist', $artist)->with('total', $total)->with('title', $title)->with('description', $description);
 }
开发者ID:popfeng,项目名称:zao,代码行数:22,代码来源:MusicController.php

示例5: header

<?php

include 'models.php';
if (isset($_POST['id'])) {
    $a = Artist::find($_POST['id']);
    $a->Name = $_POST['name'];
    if ($a->save()) {
        header("Location: " . "artist.php?id=" . $a->ArtistId);
    }
} else {
    $a = Artist::create($_POST['name']);
    if ($a->save()) {
        header("Location: " . "artist.php?id=" . $a->ArtistId);
    }
}
开发者ID:stealthrob,项目名称:Dangerous_Eagle,代码行数:15,代码来源:guardar_artist.php

示例6: api_get_artist_by_id

 public function api_get_artist_by_id($artist_id)
 {
     $artist = Artist::find($artist_id);
     return Response::json($artist);
 }
开发者ID:ariftechnologies,项目名称:musicStore,代码行数:5,代码来源:MusicStoreController.php

示例7: isset

		
		var uno = !!document.forms["formulario"]["name"].value; //Esta es la representación booleana de la cadena
		if (  
			uno &&  
			(isNaN(document.forms["formulario"]["name"].value)) 
			) {
			return true;
		}else{
			return false;
		};
		
	}
</script>
<?php 
include 'models.php';
$artist = isset($_GET['id']) ? Artist::find($_GET['id']) : Artist::create(null);
?>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
	<title>New Artist</title>
</head>
<body>
	

<div class="container">
<div class="jumbotron">
	<h1>Nuevo Artista</h1>
</div>
<div class="row"> <!--Sección para hacer el formulario en medio de la pantalla-->
开发者ID:stealthrob,项目名称:Dangerous_Eagle,代码行数:30,代码来源:artist.php

示例8: alias_name

 public function alias_name()
 {
     $name = '';
     if ($this->alias_id) {
         try {
             $name = Artist::find($this->alias_id)->name;
         } catch (Rails\ActiveRecord\Exception\RecordNotFoundException $e) {
         }
     }
     return $name;
 }
开发者ID:JCQS04,项目名称:myimouto,代码行数:11,代码来源:Artist.php


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