mercredi 30 octobre 2019

laravel links() returns empty htmlstring even though there are more data

links() returns empty HtmlString

links() works fine in other blades with other controllers.
I tried render() but not working as well.

$result = DB::table(some table)->
some queries
->orderByRaw('start_time')
// ->paginate(20);
->get();
 dd($result);
Collection {#357 ▼
  #items: array:1152 [▶]
}

if I link() or render(), it shows empty even though there are more than 1k rows.
It shows 20 rows in blade, but only paginators.

$result = DB::table(some table)->
some queries
->orderByRaw('start_time')
->paginate(20);
dd($result->links());
HtmlString {#348 ▼
  #html: ""
}

HtmlString should show listing below that <ul> like that because I have many rows..
Can anybody help what could be problem?

HtmlString {#328 ▼
  #html: """
    <ul class="pagination">\n


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/34kiDEB
via IFTTT

Aucun commentaire:

Enregistrer un commentaire