Showing 10 of 2,055 results.

Laravel MessageBag Public API: count

The count method is a straightforward method and simply returns the total number of items in the collection. The count method returns an integer. 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4 5 // Create a new collection instance. 6 $...

Laravel ViewErrorBag Public API: count

The count method returns the number of messages stored within the default MessageBag instance. It is also the only MessageBag method that specifically handled by the ViewErrorBag instance itself because it needs to be declared within the...

X/Twitter Metadata

…The values it uses are pulled from the config/site_essentials/metadata.php configuration file: 1 <?php 2 3 return [ 4 ' twitter ' => [ 5 ' site ' => null , 6 ' site_id ' => null , 7 ' creator ' => null , 8 ' creator_id ' => null , 9 10 '...

getPhpTags | Querying Document Nodes

Returns all PHP tags within the document. PHP tags are created after parsing raw PHP regions within the source template. PHP tags will be created whenever the following types of PHP tags are encountered: PHP Short Echo:, <?= ?>, PHP Open:, <?php...

Front-end Templates

The required meta tags can be added to your front-end Antlers templates in a few different ways. The simplest method is to use the provided {{ get_social_media_images /}} tag: 1 <! doctype html > 2 < html > 3 < head > 4 {{ get_social_media_images...

Laravel 5 Macros: Creating Callback Macros

The first method of creating macros we will explore is the callback function macro. These macros are added to the various classes directly by calling the macro method on the macroable class and then supplying the callback function that will be...

removeCompiledFiles | Compiling Workspaces

Attempts to remove all compiled files produced by the workspace. 1 <?php 2 3 use Stillat \ BladeParser \ Workspaces \ Workspace ; 4 5 public function removeCompiledFiles ( ) : Workspace ;