Showing 10 of 1,278 results.

Laravel String Helper Function: slug

…arators from the beginning and end of the string. The signature for the slug helper method is: slug($title, $separator = '-') This function will also convert the entire string to its lower cased alternative. 1 use Illuminate \ Support \ Str ; 2 3...

Laravel Array Helper Functions

Laravel provides many helper functions for interacting and manipulating array data structures. Laravel's array functions offer additional functionality on top of PHP's built in array functions. The helper functions in this section are located...

Laravel Facades Part Two: Using Facades

This article is part of a four part series all about Laravel facades. Each of the parts are listed below: Laravel Facades Part One: An Introduction to Facades, Laravel Facades Part Two: Using Facades, ., Laravel Facades Part Three: Creating Custom...

Laravel ViewErrorBag Public API: getBag

…y name is the intended key. This technique exhibits the same behavior as using the getBag method. 1 <?php 2 3 // Get the 'formErrors' MessageBag instance. 4 $ formErrors = $ viewErrorBag -> formErrors ;This article is part of a mini-series all...

Laravel ViewErrorBag Public API: hasBag

…ErrorBag -> put ( ' payments ' , new MessageBag ) ; 24 25 // Check again if the 'payments' MessageBag instance 26 // exists. 27 // 28 // true 29 $ doesExist = $ viewErrorBag -> hasBag ( ' payments ' ) ;This article is part of a mini-series all...

Laravel ViewErrorBag Public API: count

…instance. Because of this adding the MessageBag formErrors did not affect the count, but setting the same MessageBag instance as the value for the default key did change the results of the count method.This article is part of a mini-series all...

Laravel ViewErrorBag Public API: getBags

…10 ' paymentErrors ' => 11 object ( Illuminate \ Support \ MessageBag ) [ 143 ] 12 protected ' messages ' => 13 array ( size = 0 ) 14 empty 15 protected ' format ' => string ' :message ' ( length = 8 )This article is part of a mini-series all...

Laravel ViewErrorBag Public API: put

…ected ' messages ' => 3 array ( size = 1 ) 4 ' username ' => 5 array ( size = 1 ) 6 0 => string ' The username is required. ' ( length = 25 ) 7 protected ' format ' => string ' :message ' ( length = 8 )This article is part of a mini-series all...

Laravel 5: View Error Bags

…uminate \ Support \ ViewErrorBag ; 2 3 // Create a new ViewErrorBag instance. 4 $ viewErrorBag = new ViewErrorBag ; 5 6 // Determine if the default MessageBag 7 // instance is empty, which in this case 8 // is true. 9 $ viewErrorBag -> isEmpty (...

Laravel Hashing: One Way Encryption

…original message cannot be retrieved from the resulting hash. Hashing is accomplished through the use of a hash function. A hash function generally accepts some input, called a message and transforms the message to produce a given output, a...