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


PHP Posts::get方法代码示例

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


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

示例1: allPosts

 public function allPosts(Request $request)
 {
     $posts = Posts::get();
     return $posts;
 }
开发者ID:shadowfox476,项目名称:hannahs_blog,代码行数:5,代码来源:PostsController.php

示例2: function

});
/**
* API
*/
Route::get('api/users', ['middleware' => 'cors', function () {
    return \Response::json(\App\User::get(), 200);
}]);
Route::get('api/markers', ['middleware' => 'cors', function () {
    return \Response::json(\App\Mark::get(), 200);
}]);
Route::post('api/markers', ['middleware' => 'cors', function () {
    return \Response::json(\App\Mark::get(), 200);
}]);
Route::get('api/contributors', ['middleware' => 'cors', function () {
    return \Response::json(\App\Contributor::get(), 200);
}]);
Route::get('api/posts', ['middleware' => 'cors', function () {
    return \Response::json(\App\Posts::get(), 200);
}]);
Route::get('api/news', ['middleware' => 'cors', function () {
    return \Response::json(\App\Posts::get(), 200);
}]);
Route::post('oauth/access_token', function () {
    return Response::json(Authorizer::issueAccessToken());
});
Route::get('email', function () {
    Mail::raw('Novo voluntário cadastrado', function ($m) {
        $m->to('mariliasemdengue@marilia.sp.gov.br', 'Marilia sem Dengue')->bcc('faq@sotaquepropaganda.com.br', 'Marilia sem Dengue')->subject('Novo voluntário cadastrado no site');
    });
    return \Redirect::to('/home');
});
开发者ID:ronal2do,项目名称:stq004,代码行数:31,代码来源:routes.php

示例3: array

     break;
 case "delete":
     if (!Permission::sufficient('staff')) {
         Response::fail();
     }
     if (!$Database->whereEp($Episode)->delete('episodes')) {
         Response::dbError();
     }
     Logs::action('episodes', array('action' => 'del', 'season' => $Episode->season, 'episode' => $Episode->episode, 'twoparter' => $Episode->twoparter, 'title' => $Episode->title, 'airs' => $Episode->airs));
     $CGDb->where('name', "s{$Episode->season}e{$Episode->episode}")->delete('tags');
     Response::success('Episode deleted successfuly', array('upcoming' => Episodes::getSidebarUpcoming(NOWRAP)));
     break;
 case "requests":
 case "reservations":
     $only = $action === 'requests' ? ONLY_REQUESTS : ONLY_RESERVATIONS;
     $posts = Posts::get($Episode, $only);
     switch ($only) {
         case ONLY_REQUESTS:
             $rendered = Posts::getRequestsSection($posts);
             break;
         case ONLY_RESERVATIONS:
             $rendered = Posts::getReservationsSection($posts);
             break;
     }
     Response::done(array('render' => $rendered));
     break;
 case "vote":
     if (isset($_REQUEST['detail'])) {
         $VoteCountQuery = $Database->rawQuery("SELECT count(*) as value, vote as label\n\t\t\t\tFROM episodes__votes v\n\t\t\t\tWHERE season = ? && episode = ?\n\t\t\t\tGROUP BY v.vote\n\t\t\t\tORDER BY v.vote ASC", array($Episode->season, $Episode->episode));
         $VoteCounts = array('labels' => array(), 'datasets' => array(array('data' => array())));
         foreach ($VoteCountQuery as $row) {
开发者ID:ponydevs,项目名称:MLPVC-RR,代码行数:31,代码来源:episode.php


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