Showing 10 of 2,133 results.

Laravel and Kint Debugging

…wrote this post about working with Laravel and Kint. It works, but it can be a pain to manage through composer updates (losing your lock file, whatever happens), Laravel upgrades, it doesn't matter. The problem is that sometimes using the dd()...

Spam Check Tip | The "is" Filters

If you wanted to retrieve all comments that have not yet been flagged as either spam or not spam, you can use the where filter to check if that value has not been set: 1 {{ meerkat : responses filter = " where(spam, == , null) " }} 2 3 {{ comments...

Laravel 5: Ensuring a Value is an Array With wrap

At some point in your PHP adventures, you have either seen, or written code like the following: 1 function checkDomains ( $ domains ) { 2 if ( ! is_array ( $ domains ) ) { 3 $ domains = ( array ) $ domains ; 4 } 5 6 foreach ( $ domains as $ domain...

Charset | General Metadata

…, but can be overridden: 1 <?php 2 3 use Stillat \ StatamicSiteEssentials \ Support \ Facades \ Metadata ; 4 5 Metadata :: general ( ) -> charset ( ) ; 6 Metadata :: general ( ) -> charset ( ' ascii ' ) ; 7 Metadata :: general ( ) -> charset (...

Regenerating Images | Generating Images

By default Social Media Image Kit will not regenerate images that were previously generated when running the generate-images command. To force a regeneration we can use the --regen flag: 1 php artisan social-media-image-kit:generate-images --regen

withValidators | Validating Documents

Adds a list of validator instances to the internal BladeValidator instance. Argument Description $validators The validator instances. 1 <?php 2 3 use Stillat \ BladeParser \ Document \ Document ; 4 5 public function withValidators ( 6 array $...

Available Orderable Parameters | Sorting Comment Threads

There are many variables that can be used when sorting comment threads; please consult the Default Variables article for information about which properties are available. Compound properties may not be currently supported (i.e.,...

Laravel Artisan General Command: The down Command

The down command is used to put the application into maintenance mode. It does this by creating a file named down in the framework storage path (which by default is storage/framework/ ). The following demonstrates the command's usage: 1 php...

locale() | The Laravel Translator

The locale() method is functionally identical to the getLocale() method. It internally returns the value of the getLocale() method. 1 <?php 2 3 // Get a `Translator` instance from the application container. 4 $ translator = app ( ' translator ' )...

Laravel Artisan General Command: The clear-compiled Command

The clear-compiled command is used to clear the compiled classes and services application cache. These two files are located in the bootstrap/cache/ directory. The compiled classes cache is stored in a file named compiled.php and the services...