![data_forget Helper for Laravel](https://laravelsage.com/storage/media/25/conversions/data_forget-helper-responsive.jpg)
data_forget Helper for Laravel
Since Laravel version 10.15, there is a new utility function called data_forget that allows you to remove keys from an array or object using a "dot" notation.
2 min read
Tags:
Testing APIs is a crucial part of any web development project to ensure the functionality and reliability of the application. While there are various tools and libraries available for this purpose, Laravel Routes to Postman stands out as a simple yet powerful tool for Laravel developers. This tool automatically generates a Postman collection from your Laravel Routes, providing a straightforward way to test your API endpoints within the popular API testing tool, Postman.
Installation:
To begin with, you need to have a Laravel project set up with some API routes defined. Once your project is ready, follow these steps:
Navigate to the GitHub repository of Laravel API to Postman: https://github.com/andreaselia/laravel-api-to-postman
Follow the installation instructions provided in the README file.
Let's consider a simple use case where you have a Laravel API with endpoints for user authentication and product management.
Generate Postman Collection:
After installing Laravel API to Postman, run the command specified in the documentation to generate your Postman collection.
Testing Authentication Endpoint:
In Postman, you will find the generated collection with all your API endpoints. Select the authentication endpoint, enter the required credentials, and send the request to test the authentication functionality.
Testing Product Management Endpoints:
Similarly, select the product management endpoints in the generated Postman collection, enter any required data, and send the requests to test the CRUD (Create, Read, Update, Delete) operations for managing products.
Laravel Routes to Postman simplifies the API testing process by automatically generating a Postman collection from your Laravel API. This functionality, coupled with the support for bearer and basic auth, makes it a valuable addition to the toolkit of Laravel developers, aiding in ensuring the robustness and reliability of the API endpoints in their projects.
Full-stack developer with a knack for Merging creativity with technical expertise for standout solutions.
Since Laravel version 10.15, there is a new utility function called data_forget that allows you to remove keys from an array or object using a "dot" notation.
The ChatGPT Laravel API Package Generator package for Laravel generates smart API mocks in Laravel using ChatGPT prompts:
You can make your Laravel app multi-tenant using the Tenancy for Laravel Tenant package. This tenancy package lets you make any Laravel application multi-tenant without rewriting it.
Are you ready to take your Laravel skills to the next level and build extraordinary applications? Look no further! In this blog post, we will unveil a treasure trove of top packages that will revolutionize your development process.
The Livewire Tables package brings dynamic tables for models to Laravel Livewire. These are some of the features which you will get out of the box:
The MJML PHP package by Spatie can help you create email templates more easily. But there is a catch. It can be difficult to craft visually appealing and functional email templates that work across a variety of email clients.
Subscribe for 20+ new Laravel tutorials every week
You can unsubscribe at any time. You'll also get -20% off my courses!