本文整理汇总了PHP中Test::first方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::first方法的具体用法?PHP Test::first怎么用?PHP Test::first使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test
的用法示例。
在下文中一共展示了Test::first方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$result = Test::first();
echo "<pre>";
// var_dump($result);
$first = Article::find(1);
var_dump($first->content);
echo '<h1>this is index</h1>';
$this->view = View::make('home')->with('article', Article::first())->withTitle('MFFC :-D')->withFuck('Ok!');
}
示例2: testViewDetailsView
public function testViewDetailsView()
{
$url = URL::route('test.viewDetails', array(Test::first()->id));
// Set the current user to admin
$this->be(User::first());
$crawler = $this->client->request('GET', $url);
$this->assertCount(4, $crawler->filter('div.panel'));
}
示例3: details
public function details($title, $id = '')
{
$medicaltest = Test::first(array("id = ?" => $id));
$services = Service::all(array("property = ?" => "test", "property_id = ?" => $id), array("centre_id", "charge"), "charge", "desc", 10, 1);
$this->seo(array("title" => $medicaltest->title, "keywords" => $medicaltest->title, "description" => substr(strip_tags($medicaltest->details), 0, 150), "view" => $this->getLayoutView()));
$view = $this->getActionView();
$view->set("medicaltest", $medicaltest);
$view->set("services", $services);
}