下面的代码会抛出错误
Call to a member function `links()` on a non-object
路线.php:
Route::get('videos', function(){
$data = DB::table('video_data_r')->paginate(5);
return View::make('video',$data);
});
对应video
视图:
<?php foreach($data as $item): ?>
<div class="video_entry">
<a href="<?php echo $item -> url; ?>" target="_blank"><img src="<?php echo $item -> thumb; ?>" /></a>
<a href="<?php echo $item -> url; ?>" target="_blank"><?php echo $item -> title; ?>"</a>
</div>
<?php endforeach; ?>
<?php echo $data->links();?>
你能给我一个关于什么看起来像一个微不足道的错误的好提示吗?