vendredi 29 avril 2016

Join statment in controller not working Laravel 5.0

Works perfectly in routes but does not work in controller. What might be wrong?

    public function index(){

    $positions = DB::table('position')
    ->join('company', 'position.company_id', '=', 'company.id')
    ->select('position.*', 'company.name')
    ->get();

    //Just to check if its working
    print_r($positions);
}



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

Aucun commentaire:

Enregistrer un commentaire