![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.
1 min read
Tags:
The ChatGPT Laravel API Package Generator package for Laravel generates smart API mocks in Laravel using ChatGPT prompts:
use YellowDigital\LaravelChatgptMockApi\Facades\ChatGPTMockApi;
Route::get("/mock-response", function() {
return ChatGPTMockApi::generate(prompt: "European countries and their national food",
keys: ["id","name","food","food_description",],count: 3,);
});
Which would generate the following JSON response:
[{
"id": 1,
"name": "Italy",
"food": "Pizza",
"food_description": "A delicious round dough topped with tomato sauce, cheese and a variety of toppings."
},
{
"id": 2,
"name": "France",
"food": "Croissants",
"food_description": "A flaky, buttery pastry that is commonly eaten for breakfast or as a snack."
},
{
"id": 3,
"name": "Spain",
"food": "Paella",
"food_description": "A rice dish that originated in Valencia and is typically made with saffron, chicken, and shellfish."
}]
To avoid hitting API limits (and perhaps improving performance on subsequent requests), by default, this package caches generated responses.
At the time of writing, this package also offers a few other features, like disabling the aforementioned cache and configuring the ChatGPT Model used with the prompt.
You can learn more about this package, get full installation instructions, and view the source code on GitHub.
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.
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:
Laravel Translations UI is a package that provides a simple and friendly user interface for managing translations in a Laravel app.
Postal mail server might be the perfect solution for managing your mail server if you're looking for a robust, open-source solution.
Subscribe for 20+ new Laravel tutorials every week
You can unsubscribe at any time. You'll also get -20% off my courses!