Skip to main content

Search Results for "API"

We found 26 results for "API".

Tutorial Premium

Laravel API Errors and Exceptions: How to Return Responses

API-based projects are more and more popular, and they are pretty easy to create in Laravel. But one topic is less talked about - it's error handling for various exceptions. API consumers often complain that they get "Server error" but no valuable messages. So, how to handle API errors gracefully? How to return them in "readable" form?

Package 2860 stars

DarkaOnLine/L5-Swagger

OpenApi or Swagger Specification for your Laravel project made easy

Package 635 stars

binarcode/laravel-restify

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code.

Package 1020 stars

AndreasElia/laravel-api-to-postman

This package allows you to automatically generate a Postman collection based on your API routes. It also provides basic configuration and support for bearer auth tokens and basic auth for routes behind an auth middleware.

Tutorial Free

Laravel API 404 Response: Return JSON Instead of Webpage Error

If you're building a Laravel project with both Web and API sides, you need to customize error messages for each of them separately. In web-view there should be error pages, and API exceptions should return JSON with status codes. How to handle it? I will show you an example with case of Model Not Found 404.

Tutorial Free

Laravel API: Override 404 Error Message in Route Model Binding

If you use Route Model Binding in your API Controllers and the record is not found, it will automatically return the 404 status code with an error message like "No query results for model [App\\Models\\User] 1". How can you override it?

Tutorial Free

Resource Controllers for API: How to Remove create/edit methods?

Resource controllers are great for CRUDs, but if we use them for APIs, there are two unnecessary methods - create() and edit(), cause there are no visual forms for it. So how to remove them from routes? There are two ways.

Package 1591 stars

tailflow/laravel-orion

Laravel Orion allows you to build a fully featured REST API based on your Eloquent models and relationships with simplicity of Laravel as you love it.