Showing 10 of 1,322 results.

Laravel Collection Public API: except

…alue similar to the following output: 1 Collection { 2 #items: array:2 [ 3 "first_name" => "John" 4 "last_name" => "Doe" 5 ] 6 } We can also combine the except method with the toJson method to easily remove sensitive data from information before...

Laravel 4: Rendering a View to a String

…views folder to the web client. If you need to 'render' the view and store it in a variable you can use this code: 1 <?php 2 3 Route :: get ( ' / ' , function ( ) { 4 5 $ myViewData = View :: make ( ' hello ' ) -> render ( ) ; 6 7 } ) ; This is...

Always Check for Nested Comments | Responses and Replies

When writing recursive comments, always check if there are nested comments by using a condition similar to the following example: 1 {{ comments }} 2 {{ if comments }} 3 {{ * recursive comments * }} 4 {{ /if }} 5 {{ /comments }}

Wrapping our Nested List | Responses and Replies

…e that we had to specify the wrapper element again ( ul ): 1 {{ if comments }} 2 < ul class = " nested-list " > {{ * recursive comments * }} </ ul > 3 {{ /if }} This provides you the opportunity to wrap the replies in a custom wrapper element,...

Browser Support

…use of Tailwind CSS 3 and Alpine.js 3 for the front-end portion of the site. Tidal should work well on the latest stable versions of the following browsers: Chrome, Firefox, Edge, Safari Tidal does not support any version of Internet Explorer...

Laravel Collection Public API: reject

…. The $callback should return true if the item should not be included in the final collection. To put it another way, the $callback function answers the question "Should I remove this item from the collection?" true means it will be removed,...

Laravel MessageBag Public API: jsonSerialize

…string ' first ' ( length = 5 ) 3 1 => string ' second ' ( length = 6 ) 4 2 => string ' third ' ( length = 5 )This article is the start of a mini-series about Laravel's ErrorMessageBag component. Click through the rest of the articles to continue...

Prettier 3 | Prettier Plugin Installation

If you are using Prettier 3, you need version 2 of the prettier-plugin-blade package: 1 npm install prettier-plugin-blade@^2 After adding prettier-plugin-blade to your project, you may add the following to your projects .prettierrc file: