November 29, 2016 —John Koster
The getMessageBag
method returns a reference to the MessageBag
instance. It exists to satisfy the requirements of the Illuminate\Contracts\Support\MessageProvider
interface.
1<?php2 3use Illuminate\Support\MessageBag;4 5// false6$isEqual = ($messageBag === $anotherMessageBag);7 8// true9$isEqual = ($messageBag === $messageBag->getMessageBag());
This article is the start of a mini-series about Laravel's ErrorMessageBag
component. Click through the rest of the articles to continue reading:
∎
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.