本文整理汇总了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
示例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("&", "&", $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>