Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 1 year ago.
0

You have this twice:

$vacatures =

To show all look at the "like" clause and "%".
Better to have an option where user can search or display all.
Showing all looks something like this, you may also want to paginate large resultsets:

public function ownerlist()
	{
	if(isset($_REQUEST['t1']))
        {
            $t1 = $_REQUEST['t1'];
        }
        else
        {
            $t1 = "";
        }
        $ownersearch = $t1;
        $ownersearch = $ownersearch . "%";
        $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']);

Not your data I know, but just an example of like clause.
You may have to chain wheres, examples are in the manual.

Last updated 9 years ago.
0

This was very usefull! Thanks.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.