![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.
3 min read
Tags:
Mailweb Email functionality is a key component of many web development applications. Registrations, password resets and notifications all depend on an app sending emails effectively. Debugging such issues can be difficult when you don't want to send out test emails to real people - that's where Laravel MailWeb comes in. This article looks at how this Laravel package simplifies the process of debugging emails locally.
Laravel's MailWeb package allows developers to capture and view emails sent by their application during development. By intercepting emails locally, it prevents them from being sent to real recipients and instead captures them for debugging.
MailWeb prevents your application from sending real emails during development and testing, which is crucial to prevent spamming real users or clients.
The MailWeb application captures all outgoing emails and provides an easy-to-use web interface for reviewing and inspecting them.
Developers can use it to thoroughly test email functionality to ensure the content, formatting, and attachments are correct, and to identify and fix any issues with email generation and delivery.
During the development and testing phases, you can focus on fine-tuning your email templates and functionality without worrying about accidentally sending emails to real recipients.
Installing MailWeb in your Laravel project is a simple process. Here are the steps:
1 - Require the Package: In your Laravel project's root directory, open the composer.json
file and add the following line to the require-dev
section:
"barryvdh/laravel-mail-pretend": "^0.5"
2 - Install the Package: Run the following Composer command to install the package:
composer update
3 - Configure Laravel Mail: In your Laravel project, navigate to the config/mail.php
file and set the pretend
option to true
:
'pretend' => true,
4 - Publish Configuration (Optional): You can publish the MailWeb configuration file to customize its settings:
php artisan vendor:publish --provider="Barryvdh\Mail\ServiceProvider" --tag="config"
5 - Accessing MailWeb: With it installed and configured, you can access it in your web browser by visiting the /mailweb
route of your Laravel application. Here, you can view and analyze all captured emails.
In addition to simplifying the testing and debugging of email functionality during development, Laravel MailWeb is a valuable tool for Laravel developers. In addition to saving you time and resources, it ensures the reliability of your email-related code by intercepting and capturing outgoing emails before they go to real recipients. Streamline your email debugging process and create robust applications by incorporating it into your Laravel projects.
To access the complete documentation, please visit the official GitHub repository at:
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!