Search

Showing 7 of 1,216 result(s)

/blog/2018/04/21/laravel-5-message-bags-adding-messages-to-the-message-bag-with-add#content-example-use

The following code example demonstrates how to add messages to a MessageBag instance: After the above code has executed, the $messages variable will be an array and contain a value similar to the following output: The add method allows multiple...

/blog/2018/04/21/laravel-5-message-bags-adding-messages-to-the-message-bag-with-add#content-notes-on-keys

The $key supplied to the add method should make sense in some context. The examples so far have been fairly arbitrary, and are mainly designed to explain the concepts that are being presented. However, MessageBag instances are most commonly...

/blog/2018/04/21/laravel-5-message-bags-converting-the-message-bag-to-json-with-tojson#content-example-use

The following examples demonstrate the basic usage of the toJson method: After the above code has executed, the $jsonValue variable would contain a value similar to the following output (some lines have been wrapped and indented to improve...

/blog/2018/04/21/laravel-5-message-bags-converting-the-message-bag-to-json-with-tojson#content-tojson-and-deeply-nested-data-structures

The toJson method internally makes a call to PHP's json_encode function. Unlike json_encode , toJson does not provide a way to specify the depth (essentially how many arrays are nested inside of each other) to which data will be encoded, which is...

/blog/2018/04/21/laravel-5-view-error-bags-add-a-new-message-bag-instance-to-the-view-error-bag-with-put#content-example-use

The following code demonstrates how to add a new MessageBag instance to a ViewErrorBag : After the above code has executed, the $messageBagCount variable would contain the value 1 . Another way to add MessageBag instances to the ViewErrorBag is by...

Some absolutely amazing
people

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.