lundi 29 février 2016

how to use foreach loop for two different tables in same page in laravel5

how to use for each loop to retrieve the data from database in laravel5,there is two tables in same page property_details and agent_details then we join two table and show the agent_details as per the same state of property_details.

controller for property_details; public function property_details($state) {

        $view=DB::table('property_details')->where('state',$state)->get();
        return view::make('pages/property_details', array('row'=>$view));

    }

Route::get('property_details/{id}', array('as' => 'property_details', 'uses' => 'PageController@property_details'));



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1nbrHVX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire