Showing 10 of 1,322 results.

MySQL: Root Element Is Missing (Windows 8.1)

The other day when I restarted my development machine I got a nice little surprise from MySQL Notifier. A charming error message appeared on the screen that said "High Severity Error: Root element is missing". Dismissing this error, another one...

Laravel Artisan Generator Command: The make:event Command

…:event command is used to generate a new event class. The command requires a name parameter to be supplied, which will be the name of the new class. The generated classes by default will extend the App\Events\Event class (the actual namespace may...

Laravel Array Helper Function: array_last

last($array, callable $callback = null, $default = null) The last helper method is the logical opposite of the first (discussed in the article Laravel Array Helper Function: array_first method. The difference is that the last function will return...

Laravel Application Helper: abort_if

abort_if($boolean, $code, $message = '', array $headers) The abort_if helper function performs the same basic function as the abort helper function (discussed in the Laravel Application Helper: abort article). The only difference is that the...

Laravel Miscellaneous Helper Function: data_set

…ame ' => ' Jane ' , 5 ' last_name ' => ' Doe ' , 6 ' age ' => 26 7 ] ; 8 9 data_set ( $ testArray , ' first_name ' , ' Jill ' ) ; Because the $overwrite property is set to true by default the first_name item will now contain the value Jill . If...

Laravel Fluent Part One: Introduction

…s. For example, attempting to retrieve data from an array that does not exist results in an instance of ErrorException being thrown: 1 <?php 2 3 // Will raise an exception 4 $ value = $ testArray [ ' does_not_exist ' ] ; The exact error message...

Laravel Miscellaneous Helper Function: dd

dd() The dd function is a debug utility that will dump a set of values and then die. This means it will create a human-readable representation of the values and then stop execution of the script. The dd function will take into account if the...

But Why? | Lambdas And Closures

These anonymous functions are useful when we as developers need to do something right then and there, but do not necessarily want, or need to create a dedicated function for the task. Like when we define routes in Laravel, it would be cumbersome...