Answers for "throw request error laravel"

PHP
2

throwexception laravel

throw new ErrorException('Error found');
Posted by: Guest on July-30-2021
0

Laravel Http client throw exception if request is not successful

$response = Http::withToken(Auth::user()->magento_access_token)->get('' . Auth::user()->magento_base_url . 'rest/V1/categories/');
        $response->throw();
Posted by: Guest on October-07-2021

Browse Popular Code Answers by Language