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


PHP Movie::whereBetween方法代码示例

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


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

示例1: array

        $results[] = array('id' => $row->fl_id, 'name' => $row->fl_name, 'year' => $row->fl_year, 'image' => $row->fl_image, 'url' => Common::cleanUrl($row->fl_name));
    }
    return json_encode($results);
});
Route::get('invite', 'UsersController@invite');
Route::post('invite', 'HomeController@inviteSend');
Route::post('invite/add', 'InviteController@add');
Route::get('invite/add', 'InviteController@add');
Route::get('invite/friend', 'InviteController@friend');
Route::post('invite/friend', 'InviteController@friend');
Route::get('myscore', function () {
    echo $action = DB::table('user_actions')->where('subject_id', Auth::user()->id)->where('object_type', 'film')->where('film.fl_rating', '!=', '0')->join('film', 'film.fl_id', '=', 'user_actions.object_id')->avg('fl_rating');
});
Route::get('feed/global', 'HomeController@globalFeed');
Route::get('change', function () {
    $name = Movie::whereBetween('fl_id', array(1, 20000))->get();
    foreach ($name as $film) {
        //tag1 without spaces without expressions
        //tag2 with spaces without expressions
        //tag3 same as name
        $tag1 = str_replace(array(' ', "'", ';', ':', '.', '-', ',', '%', '&', '$', '"', '_', ')', '(', '@'), '', $film->fl_name);
        $tag2 = str_replace(array(';', "'", ':', '.', '-', ',', '%', '&', '$', '"', '_', ')', '(', '@'), '', $film->fl_name);
        $tags = $tag1 . ', ' . $tag2 . ', ' . $film->fl_name;
        echo $film->fl_id . '<br/>';
        DB::table('film')->where('fl_id', $film->fl_id)->update(array('fl_tags' => $tags));
    }
});
/* 
// inserts the review
  
开发者ID:palhimanshu1991,项目名称:berdict,代码行数:29,代码来源:routes.php

示例2: ob_start

<?php

ob_start();
$time = time();
$actual_date = date('Y-m-d', $time);
$movie = Movie::whereBetween('fl_id', array(1, 3501))->get();
header('Content-Type: application/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
foreach ($movie as $movie) {
    $title_str = Common::cleanUrl($movie->fl_name);
    $utf8_str = iconv("iso-8859-15", "UTF-8", $title_str);
    $url_str = str_replace("(", "", $utf8_str);
    $url_str2 = str_replace("&", "&#x26;", $url_str);
    ?>
 
<url>
<loc>http://www.berdict.com/movie/<?php 
    echo $movie->fl_id;
    ?>
/<?php 
    echo $url_str2;
    ?>
/reviews</loc>
<lastmod><?php 
    echo $actual_date;
    ?>
</lastmod>
<priority>1.0</priority>
<changefreq>daily</changefreq>
</url>
开发者ID:palhimanshu1991,项目名称:berdict,代码行数:31,代码来源:sitemap.php


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