mardi 21 juin 2016

Unable to catch exceptions in Laravel 5.1

Unable to catch exception in laravel 5.1

      $companyID = $userprofile->company_id;                      
       try{                       
           $companies=Company::find($companyID)->first()->name;                   
        }catch (\Illuminate\Database\QueryException  $ex){
           dd($ex->getMessage());
       }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire