Support the ongoing development of Laravel.io →
Eloquent Views Packages
Last updated 1 year ago.
0

The way to iternate over the data is do it from what is passed from controller:

Controller:

$data['owners'] = DB::table('powners')
                        ->where('oname', 'like', $ownersearch)
                        ->orderBy('oname', 'asc')
                        ->Paginate(5);
        $data['osearch'] = $t1;
        return View::make('owner/pownerlist')->with('data', $data['owners'])->with('data2', $data['osearch']);

View:

foreach ($data as $owner){
     $owner->oname
}
0

But what i think that its weird , is that i can to that(what i've made) when a view that dont belongs to a package :/

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Rubemlrm rubemlrm Joined 4 Feb 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.

© 2024 Laravel.io - All rights reserved.