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