Showing 7 of 1,697 result(s)
The macro method is used to add a callback function macro to any class that utilize the "Illuminate\Support\Traits\Macroable" trait.The signature of the macro method is:The following example demonstrates how to add a new method chunk to the...
The following sections discuss the various methods that become available when utilizing the Macroable trait; there are not that many of them, but that does not detract from the fact that the Macroable trait is incredibly useful.The following...
The isEmpty method is the logical opposite of the any method. It returns a boolean value indicating if the message bag is empty (having no messages). It returns true if the message bag is empty; it returns false if the message bag contains...
The isNotEmpty method returns a boolean value indicating if the MessageBag instance actually has any messages. The method returns true if the instance has messages, otherwise it returns false . The isNotEmpty method is an alias of the any...
The any method returns a boolean value indicating if the MessageBag instance actually has any messages. The method returns true if the instance has messages, otherwise it returns false .The signature of the any method is: public function any();The...
The keys method is used to retrieve all of keys stored inside the MessageBag instance.The signature of the keys method is: public function keys();The following code example demonstrate the usage of the keys method: After the above code has...
The getMessages method is used to return all of the messages stored within the MessageBag instance. The getMessages method will always return an array. If there are no messages in the message bag, an empty array will be returned.The signature of...