Search Results

Search found 1 results on 1 pages for 's0hno'.

Page 1/1 | 1 

  • Laravel4: Call to a member function on a non-object

    - by s0hno
    The following code will throw an error Call to a member function `links()` on a non-object routes.php: Route::get('videos', function(){ $data = DB::table('video_data_r')->paginate(5); return View::make('video',$data); }); Corresponding video view: <?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();?> Could you give me a good hint on what looks like a trivial error?

    Read the article

1