Showing 10 of 2,044 results.

Part Two: Creating a Custom Pagination View in Laravel

This is part two of two in a series of posts on how to create a custom pagination view in Laravel. Before reading this part, it is highly recommended that your first read Part One: Creating a Custom Pagination View in Laravel of this series. In...

hasErrorOnLine | Validating Documents

…$ template = <<< ' BLADE ' 6 {{ $ hello {{-- world --}} 7 BLADE ; 8 9 $ doc = Document :: fromText ( $ template ) ; 10 11 // Returns true 12 $ hasError = $ doc -> hasErrorOnLine ( 1 , ErrorType :: UnexpectedCommentEncountered , ConstructContext...

withCoreValidators | Validating Documents

Includes the core validators on the internal BladeValidator instance. If a BladeValidator instance does not already exist on the document, a new one will be created automatically via the ValidatorFactory::makeBladeValidator() factory method. Under...

Creating Negative Ranges | Laravel 5: String Pluralization Syntax

We could also create a range for all numbers less than zero: 1 <?php 2 3 return [ 4 5 ' ranges ' => 6 7 ' {0}No items 8 |[1,3]Between one and three 9 |[4,6]Between four and six 10 |[7,*]Seven and beyond! 11 |[*,-1]Less than zero ' 12 13 ] ; The...

Recursive Comments (Nested Replies) | Responses and Replies

…he following Statamic pull request: https://github.com/statamic/cms/pull/8421 . Until this is generally available, you will need to pull this in with a composer patch, or recursively include a comment partial. The following code example...

Scope Variable Names | Responses and Replies

…d comments is important, and is determined by the current collection alias, or name. The default name is comments , so we implement the nested replies like so by default: 1 {{ meerkat : responses }} 2 3 < ul > 4 {{ comments }} 5 < li > 6 < p > {{...