Showing 10 of 2,142 results.

Adding Custom Metadata | Custom Metadata Tags

The most common place to queue custom metadata is within the site's app/Providers/AppServiceProvider.php file using the Metadata facade. To add a new <meta ...> tag, we can use the queue method and supply an array containing the attributes we want...

Submitting Replies via AJAX | Advanced Reply Forms

…ment form with the JavaScript API and helper methods, you might want to submit the comments to the Meerkat API via AJAX. In doing so, you can create incredibly interactive experiences for your site's visitors. Before diving into the rest of the...

Laravel Localization: The File Loader

The FileLoader is the class that is responsible for loading the translation files from the file system. The language files are loaded from the /resources/lang/ directory by default. The lang/ directory contains the en (English from the ISO 639-1...

Laravel URL Helper Function: secure_asset

secure_asset($path) The secure_asset function will return a URI composed of the application's URI and the given $path . It internally makes a call to the asset (discussed in the Laravel URL Helper Function: asset article) helper function and...

Compilation Phases | Blade Compiler

The provided compiler implementation is designed to be backward compatible with existing pre-compilers and extensions. The compiler utilizes multiple phases to ensure that existing tooling receives standard input and supports the node-based...

setAnonymousComponentNamespaces | Blade Compiler

Sets and overrides all anonymous component namespaces. In default setups, this is set to the return value of Illuminate\View\Compilers\BladeCompiler::getAnonymousComponentNamespaces() Argument Description $anonymousNamespaces The anonymous...

Specifying a Default Value | Laravel 4: Getting User Input

When we use the get() method, we pass the name of the field we want the value of as the first argument. We can optionally use a second argument to specify a default value if one has not been set: 1 <?php 2 3 Route :: post ( ' user/create ' ,...

Data Tools | The Statamic Add-on Roundup

The DataTools add-on allows me to perform arbitrary arithmetic and comparison operations within an Antlers template. Granted, I could have enabled PHP within templates but I really didn't want to (also, there might be some syntax to accomplish...

Laravel Array Helper Function: array_only

The only helper method is the logical opposite of the except (discussed in the article Laravel Array Helper Function: array_except ) method. The signature for the only helper method is: only($array, $keys) Assuming that the $_POST super-global...