0
Je dois montrer une ligne par page. ce mon contoller code de classeComment ajouter Pagination dans laravel 5
public function showcontent($id)
{
$story=storybook::find($id);
$content=storycontent::where('titleid', $story['id'])->paginate(1);
//return $content;
return view('storyBook/viewStory',compact('story','content'));
}
ce moi code de classe
@foreach($content as $content)
<?php $a=null; ?>
<?php $b=null; ?>
<?php $a=$content->file1; ?>
<?php $b=$content->file2; ?>
<table style="height: 330px;width: 680px;margin-top: 120px;margin-left: 50px">
<tr>
<td style="width: 340px"><img src="/{{$a}}" alt="Mountain View" style="width:330px;height:300px;"></td>
<td style="width: 340px"><img src="/{{$b}}" alt="Mountain View" style="width:330px;height:300px;"></td>
</tr>
</table>
<br>
@endforeach
ici, je ne reçois que 1er rang, reste des lignes non visibles .. Je ne sais pas comment ajouter la pagination .
Une seule ligne par page ?? –
Je reçois plus d'une ligne pour $ content..mais j'ai besoin d'afficher une ligne par page. – pinkyrox