Showing 10 of 2,055 results.

Laravel String Helper Function: substr

The substr helper method is a convenient helper built on top of PHP's mb_substr function (unlike PHP's mb_substr function, substr does not provide a way to change the encoding that is used) that is used to return a portion of a string. The substr...

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.,...

Example Use | Laravel 5 String Helpers: Pluralization and Strings

The method takes the $value that should be pluralized, and the $count of the items. If the $count is equal to 1 , the original $value is returned. 1 use Illuminate \ Support \ Str ; 2 3 // cow 4 echo Str :: plural ( ' cow ' , 1 ) ; 5 6 // cows 7...

Laravel String Helper Function: snake

The snake helper method replaces all uppercase letters within the string with the lower cased variant prefixed with the given $delimiter . The only exception to this rule is that if the first character of the string is capitalized, it will be...

Laravel Artisan Generator Command: The make:test Command

…ss. Generated tests are stored in the tests/ directory by default. This command will not overwrite any existing test classes that have the same name. An error stating Test already exists! will be displayed instead. The following example...

Print Styles

Tidal provides styling to help improve the appearance of articles and pages when printing. In general, Tidal will make the following changes when printing: Force a white background with black text,, Remove all background colors from visible...

Laravel 5.5 String Helper Method: 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...

Getting Kint to Work With Laravel 4.1

…output from the var_dump() and debug_backtrace() function and formats it nicely. Using Kint, you can look at a well organized representation of your arrays, objects, error messages and exceptions. Anything that var_dump() accepts, really. Here is...

Locale | Open Graph Metadata

The locale method queues a <meta property="og:locale" content="..."> tag. By default it will use the locale of the current site. This behavior can be modified by supplying a custom variable name or callback function. 1 <?php 2 3 use Stillat \...

The not:where:in Filter | The "where" Filters

The not:where:in filter is the logical opposite of the where:in filter. It accepts an arbitrary comment property to check, and a list of values to check against. The filter will return only those comments whose property value does not exist in the...