Showing 10 of 1,280 results.

Laravel MessageBag Public API: getFormat

…; 13 14 // <li>:message</li> 15 $ format = $ messageBag -> getFormat ( ) ; 16 17 // Reset the format. 18 $ messageBag -> setFormat ( ) ; 19 20 // :message 21 $ format = $ messageBag -> getFormat ( ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: isEmpty

…llection ; 7 8 // true 9 $ empty = $ collection -> isEmpty ( ) ; 10 11 // Add an item to the collection. 12 $ collection [ ] = ' First item ' ; 13 14 // false 15 $ empty = $ collection -> isEmpty ( ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: get

…e messages related to the first key: 1 array ( size = 2 ) 2 0 => string ' The message was: The very first message ' ( length = 39 ) 3 1 => string ' The message was: The second message ' ( length = 35 )This article is the start of a mini-series...

Laravel MessageBag Public API: first

…_exist ' ) ; The following example also changes the format of the returned message: 1 <?php 2 3 // <li>This is a message</li> 4 $ message = $ messageBag -> first ( ' first ' , ' <li>:message</li> ' ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: setFormat

…; 13 14 // <li>:message</li> 15 $ format = $ messageBag -> getFormat ( ) ; 16 17 // Reset the format. 18 $ messageBag -> setFormat ( ) ; 19 20 // :message 21 $ format = $ messageBag -> getFormat ( ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: count

…se Illuminate \ Support \ Collection ; 4 5 // Create a new collection instance. 6 $ collection = new Collection ( [ 7 ' first ' , ' second ' , ' third ' 8 ] ) ; 9 10 // 3 11 $ collection -> count ( ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: keys

…second ' ( length = 6 ) 4 2 => string ' third ' ( length = 5 ) 5 3 => string ' fourth ' ( length = 6 ) It can be seen that the results contain only the keys that were added to the MessageBag instance.This article is the start of a mini-series...

Laravel MessageBag Public API: add

…stance. 9 $ errors -> add ( ' username ' , 10 ' The username field must longer than 5 characters ' ) ; 11 $ errors -> add ( ' username ' , 12 ' The username field must contain a special character ' ) ;This article is the start of a mini-series...

Laravel MessageBag Public API: jsonSerialize

…ariable would contain a value similar to the following output: 1 array ( size = 3 ) 2 0 => string ' first ' ( length = 5 ) 3 1 => string ' second ' ( length = 6 ) 4 2 => string ' third ' ( length = 5 )This article is the start of a mini-series...

Laravel MessageBag Public API: any

…Bag = new MessageBag ; 7 8 // false 9 $ hasAny = $ messageBag -> any ( ) ; 10 11 $ messageBag -> addMessage ( ' first ' , ' The first message ' ) ; 12 13 // true 14 $ hasAny = $ messageBag -> any ( ) ;This article is the start of a mini-series...

Filter Search