Showing 10 of 2,055 results.

Laravel 5: Conditionally Throwing HTTP Exceptions With abort_if

…4 $ message = ' ' , 5 array $ headers = [ ] 6 ) ;The following example assumes that some $user object exists with the property admin . The example will check to make sure that the admin property is true . If not, the code will abort with a 401...

Laravel 5 Macros: Injecting Class-Based Macros With mixin

The mixin static method is used to load the methods of a mixin class instance into the target class as macro methods. The mixin method accepts a class instance as its first and only argument.The signature of the mixin method is: 1 public static...

Ordering by Multiple Properties | Sorting Comment Threads

Multiple sort orders can be applied to a single comment thread by chaining sort orders with the pipe ( | ) character. The following example demonstrates how to first sort by newest comments, and then by the contents of the comment: 1 {{ meerkat :...

14. Revised Versions of this License. | License

…you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you...

Example Use | Laravel 5: Adding Elements to the Array with add

Consider the following code snippet: 1 use Illuminate \ Support \ Arr ; 2 3 $ myArray = [ 4 ' animal ' => ' Araripe Manakin ' , 5 ' plant ' => ' Pineland Wild Petunia ' 6 ] ; 7 8 $ myArray = Arr :: add ( 9 $ myArray , 10 ' insect ' , 11 '...

14. Revised Versions of this License. | License

…you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you...

getValidationErrors | Validating Workspaces

Returns all validation errors present in the workspace. 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4 5 public function getValidationErrors ( ) : Collection ;