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
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community