Showing 10 of 1,278 results.

Laravel 5: Accessing HTTP Request Details With request

…request helper function, we can access only a subset of the user's input data: 1 // Get only the user's name. 2 $ name = request ( ) -> only ( ' name ' ) ; Receiving a subset of data can also be accomplished using the shorthand syntax introduced...

Laravel String Helper Function: randomBytes

…han the results of the random method. randomBytes requires the OpenSSL extension extension for PHP version 5 as it will internally use the openssl_random_pseudo_bytes function. For PHP version 7, the random_bytes function will be utilized. And as...

Laravel Miscellaneous Helper Function: data_fill

…l helper function accomplishes the same fundamental task as the data_set helper function. The only difference is that the data_fill does not define an optional $overwrite parameter. data_fill internally makes a call to the data_set (discussed in...

Laravel String Helper Function: equals

…ring ' , ' test string ' ) ; 5 6 // true 7 Str :: equals ( ' ' , ' ' ) ; 8 9 // false 10 Str :: equals ( ' AAA ' , ' aaa ' ) ; 11 12 // true 13 Str :: equals ( hash ( ' sha256 ' , md5 ( ' test ' ) ) , hash ( ' sha256 ' , md5 ( ' test ' ) ) ) ; As...

Laravel String Pluralization

Since Laravel's translator is build on top of Symfony's translator component, the syntax rules used by Symfony's pluralization system will work with Laravel. Pluralization translation lines follow the ISO 31-11 standard for numeric intervals, such...

Laravel String Helper Function: studly_case

Studly caps is a way of formatting text with capital letters, according to some pattern. Laravel's pattern is to remove the following word separators and capitalize the first letter of each word it finds (while not affecting the case of any other...

Part One: Creating a Custom Pagination View in Laravel

Update You can view the completed part two of this article by visiting Part Two: Creating a Custom Pagination View in Laravel In this post we are going to look at building a custom paginator view in Laravel 4. There are quite a few posts are the...

Alternatives to Laravel Artisan Command Signatures

The command signature feature was introduced in Laravel version 5.1. In older versions of the framework the instance methods getArguments and getOptions were used to define the input expectations for commands. Both methods were expected to return...

Laravel 5: Generating HTTPS URLs With secure_url

…' ) ; 2 3 // The previous example is equivalent to: 4 $ otherUrl = url ( ' arbitraryPath ' , [ ] , true ) ; The resulting URL would look similar to the following output. The exact URL will change depending on the $path and the domain name. 1...