Search

Showing 7 of 1,975 result(s)

/blog/2018/04/22/laravel-5-collections-retrieving-collection-elements-with-all

The all method can be used to retrieve the underlying array that the collection is using to hold its data.The signature of the all method is: public function all();The following code demonstrates the usage of the all method: After the above code...

/blog/2021/02/20/integrating-laravel-spark-and-statamic-3#content-installing-laravel-spark

…. Be aware that the documentation's code examples are configured to use Paddle, by default. At the point in the documentation where you are updating the require section of your composer.json file use these values instead: Your full require...

/blog/2023/04/10/creating-a-custom-statamic-layout-tag#content-adding-statamic-as-a-dependency

…on any version of Statamic, at least version 3.4 , but less than version 4 . When working with our addon inside an existing Statamic application, we usually get away with skipping this step as the Statamic libraries will already be available to...

/blog/2016/12/07/laravel-artisan-the-tinker-command#content-tinker-commands

…the process of debugging and executing code from the command-line. The following table lists all the commands that Tinker provides (these commands can be discovered within the Tinker REPL by issuing the help command): Command Description Alias...

/blog/2017/09/29/building-a-simple-statamic-request-addon#content-generating-the-scaffolding

…ill generate a new file in the following location within your site's directory structure: site/addons/Request/RequestTags.php ; this file will contain contents similar to the following example: You can see that Statamic has generated a few sample...

/blog/2018/04/22/laravel-5-collections-determine-which-collection-elements-are-not-present-in-the-provided-collections-with-diff

The diff method is used to determine which items in the collection are not present in the supplied $items collection. $items can be be either an array, or another instance of Collection . The diff method returns a new instance of Collection .The...

/blog/2018/04/22/laravel-5-collections-getting-the-first-collection-element-with-first#content-using-first-with-higher-order-messages

The first method can also be used with higher order messaging, which allows us to invoke collection methods and access object instance properties using PHP's property accessors syntax. In the reject section, we created a Product class that was...