April 21, 2018 —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.
The signature of the getMessageBag
method is:
1public function getMessageBag();
The following example demonstrates the usage of the getMessageBag
method:
1use Illuminate\Support\MessageBag;2 3// false4$isEqual = ($messageBag === $anotherMessageBag);5 6// true7$isEqual = ($messageBag === $messageBag->getMessageBag());
∎
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.