Questions tagged [laravel-paginate]

Using pagination in Laravel Framework

Using pagination in Laravel Framework

39 questions
1
vote
1 answer

Call to a member function links() on array in Laravel error

I was working with Laravel and I am trying to paginate my table of books. I got this error "Call to a member function links() on array in Laravel". It may be as the duplicate's error, but I still can't figure out how to solve my…
Irfan
  • 95
  • 2
  • 11
1
vote
0 answers

Laravel 5.1 Eloquent Query Builder Pagination breaking with Raw SQL

I'm trying to solve an issue with Laravel 5.1 Eloquent Query Builder, where the Pagination is breaking the SQL when the Query Builder contains RAW Selects. Background I'm building a web application where a user can query a list of Profiles. The…
Zac
  • 118
  • 1
  • 6
1
vote
2 answers

customize next and previous pagination button in laravel 5

I'm unable to customize previous and next button with laravel 5.0 app. All I'm getting is >> <<, but I want to make it more simpler: is there any way?
runningmark
  • 738
  • 4
  • 13
  • 32
1
vote
1 answer

Laravel 5.0 paginate jump to page section

I'm using Laravel 5.0 and paginate along with the render() function in my view. Rather than go back to the top of the screen after I select the next page I want it to jump to #msgs. Here is some of my code:

0
votes
1 answer

Getting Call to a member function paginate() on array error in laravel

I am getting Getting Call to a member function paginate() on array error in laravel with the following code public static function search_query($query) { $tokenizeitem = array(); $tokenizeitem = queryarr($query); //$tokenizeitem =…
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
0
votes
1 answer

Paginate does not account for changing results

I use paginate in Laravel to load a large amount of data. Data that changes quickly. The problem is that as the user scrolls through the data, new rows are being inserted at the top. This creates an issue where the user sees a duplicate row that got…
0
votes
0 answers

'Call to a member function paginate() on array' Error occurred for multiple join tables

Laravel query builder needs to paginate from multiple join tables. I've tried many ways to paginate this query. But nothing. Controller.php $ord_heds = DB::select('select d.family, d.category, d.product_img, d.ord_ref, m.min_qty, m.max_qty, t.qty,…
0
votes
1 answer

Add attributes to Laravel pagination links

Please look into my code, this is my web.php Route::get('test', function (Request $request) { $data = MyTableResource::collection(MyTable::paginate(10)); $headers = ['col1', 'col2', 'col3']; return view('test.index', compact('data',…
Sandeep Sudhakaran
  • 1,072
  • 2
  • 9
  • 22
0
votes
2 answers

Laravel paginate

The model works well. The controller works well. The only place I'm having an error is in the view. class Course extends Model { use SoftDeletes, FilterByUser; protected $fillable = ['title', 'description', 'course_image', 'start_date',…
Simona Buga
  • 341
  • 6
  • 22
0
votes
2 answers

How do i join two queries and then paginate

$data = Category::join('articles', function ($join) { $join->on('categories.id', 'articles.category_id') ->where('categories.type', 'news') ->where('articles.status', '1'); …
0
votes
1 answer

Cant send paginate meta data with response()->json

I have an api and I want to send some info to my clients. I'm using resource collection to do this. return response()->json([ 'data' => ProductResource::collection(Product::orderBy('id', 'DESC')->paginate(8)), 'catdata' =>…
Top Stars
  • 23
  • 7
0
votes
1 answer

Paginate Issue Laravel 5.6

Was wondering if someone could check this out and let me know what I'm doing wrong. I'm trying to use paginate on a database query and render it in my view. Is my DB query incorrect? I was following the docs to create it. Also read that I needed to…
daugaard47
  • 1,726
  • 5
  • 39
  • 74
0
votes
1 answer

Laravel paginator in custom query

I am working on a project in laravel. I have sql queries as string in db. The queries are very important. There is no way to write them in laravel relationships because of some situation so DB::select($table->query) I wanna paginate this with…
Ozal Zarbaliyev
  • 566
  • 6
  • 22
0
votes
1 answer

Laravel Query Builder by Distant relations id

I have 3 models Language: id,name. Table: languages.| Variant:id,name, language_id. Table:variants.| Symbol: id, name, variant_id. Table…
kishoreinme
  • 85
  • 3
  • 10
0
votes
1 answer

php - Laravel Search Controller

I am trying to make Laravel Search and stuck at point of handling POST data as an array in Eloquent way HTML Form is as