Showing 10 of 1,085 results.

Laravel Facades Part Three: Creating Custom Facades

…php namespace App \ Http \ Controllers ; 2 3 use Math ; 4 5 class TestController extends Controller { 6 7 public function getindex ( ) 8 { 9 $ result = Math :: add ( 1 , 2 ) ; 10 } 11 12 }Creating a facade alias is completely optional. Package...

Laravel Artisan Command Input and Command Signatures

…es. Options are not necessarily required, and can be used as a sort of "flag" to change the behavior of the command's execution. Options must start with the -- (double hyphen) prefix. Parameters and options are defined in the command's $signature...

Laravel 5: Getting Specific Messages With get

…messages for a given $key with the specified $format . The $format is null by default, which will cause the get method to use the format stored within the MessageBag instance (which can be retrieved using the getFormat method). Alternatively,...

Laravel ViewErrorBag Public API: put

…ageBagCount = count ( $ viewErrorBag -> getBags ( ) ) ; 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 dynamically setting an instance...

Laravel Collection Public API: zip

zip($items) The zip method is used to merge the values of the $items array with the values within the Collection at the corresponding index. The zip method produces results that are similar to Python's zip function, and developer's coming from a...

Filter Search