Ecommerce Restful API Laravel | Handle Exceptions #16

preview_player
Показать описание
Create Ecommerce Restful API with Laravel | How to Handle Exceptions in Laravel for API

What is Web API and why need web api

=====================================================

--You May Also Like --

==================FOLLOW ME ==================

Subscribe for New Releases!

(ask me questions!)

--- QUESTIONS? ---

Leave a comment below and I or someone else can help you.
For quick questions you may also want to ask me on Twitter, I respond almost immediately.

Thanks for all your support!

LARAVEL 5.4 Tutorial | Cara Instal LARAVEL 5,4 dari awal Part 1 | Bitfumes

Laravel 5.4 Tutorial | Come installare laravel 5,4 da zero Parte 1 | Bitfumes

-~-~~-~~~-~~-~-
Please watch: "Laravel 5.4 Tutorial | Email From Server (Godaddy) #3 | Part 26 | Bitfumes"
-~-~~-~~~-~~-~-
que es api
ما هو أبي
o que é api
Рекомендации по теме
Комментарии
Автор

Not good to hard code Product in the general exception handler - what if it's a User? You can see if exception has model the do something like: $model =
explode('\\', $e->getModel());
$model = end($model);
$error = "{$model} was not found";
... and pass that as the error message. Otherwise just pass "Not Found".

daledurham
Автор

nice easy to understand tutorial sir, i follow this and it also works in laravel 7

eleazarfederio
Автор

I finally found what I was looking for thank you very much

edgarrivero
Автор

How can I get Shortcut way to import Class on the top?

h.tuannguyen
Автор

How can we do this with laravel 8? The code seems not the same already

kristoffergonzaga
Автор

can i use third part packages for "User roles and permission" with the API requests and responds?

kurd-box
Автор

This is slightly buggy! The ProductRequest Symfony component path seems different and the same for the if exception classes used here. Not sure if the latest version of laravel 5.5 has changed but the code here does not work on 5.5.20

mephalanb