jeudi 1 décembre 2016

Catching Eloquent Errors

I perform various eloquent statements throughout my app. eg:

User::find($id)->update($data);

Or:

User::create($data);

Or:

User::paginate(10);

I presume the best way to tackle potential errors is to use try/catch? If so, what should I be catching for eloquent errors?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire