Support the ongoing development of Laravel.io →
posted 11 years ago
Views

Hi

i have the following action in my controller (LanguagesController)

public function index()
{
		$languages = \Language::orderBy('id','desc')->paginate(10);
		
		return View::make('backend.languages.grid')
					->with('title','Languages')
					->with('dataset',$languages);
}	

and in my view

<div class="col-sm-4 text-right text-center-xs">  
    {{ $dataset->links() }}              
</div>

and i get error

Call to undefined method Illuminate\Database\Query\Builder::links() 

I think that i have follow the examples and documentation and i dont understand why this produces an error

Last updated 3 years ago.
0

try the following:

        $title   = 'Languages';
        $dataset = Language::orderBy('id','desc')->paginate(10);

        return View::make('backend.languages.grid', compact('title', 'languages'));

I haven't used with with View before. I think it is for Redirect only.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ntanas72 ntanas72 Joined 12 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.