Showing 10 of 2,138 results.

Method 1: Template Adjustments | Guide: User-Only Comment Setup

We need to let Meerkat know about the user who is submitting the comment. The simplest way to do this is by adding a hidden authenticated_user field to your Meerkat form template (extra functionality has been removed from the template for...

Laravel 5 Collections: Paginating Collections With forPage

The forPage method is used to implement pagination over collections. The forPage defines two parameters: $page , which is used to tell the collection which "page" should be returned and $perPage , which is used to control the number of items that...

Class String Emulation | Formatter Configuration and Usage

Class string emulation is a feature (starting with version 1.5) that is able to apply the results of prettier plugins that target CSS class lists to strings contained within Blade directives and embedded PHP code. This feature also works when...

Laravel Task Scheduler: An Introduction

Laravel provides a manageable system for scheduling tasks and commands out of the box, the command scheduler. It is a replacement for systems like cron or Windows Task Scheduler in the sense that the actual scheduling of commands is done using...

Laravel String Helper Function: contains

The contains helper method will check if any of the $needles are in the given $haystack . If any of the given $needles are found in the $haystack , the method will return true , otherwise it returns false . $needles can be any value that can be...

setAnonymousComponentPaths | Blade Compiler

Sets and overrides all anonymous component paths. In default setups, this is set to the return value of Illuminate\View\Compilers\BladeCompiler::getAnonymousComponentPaths() Argument Description $paths The anonymous component paths. 1 <?php 2 3...

Example Use | Laravel 5: Sorting Arrays With sort

Let's refactor our students example from the where section to use a class based structure. First, we will create a new StudentTestResult class: 1 class StudentTestResult { 2 3 public $ name = ' ' ; 4 5 public $ testScore = ' ' ; 6 7 public...