Search

Showing 7 of 2,041 result(s)

/blog/2018/04/22/laravel-5-collections-executing-a-function-on-a-collection-and-returning-the-function-results-with-pipe

The pipe method is similar to the tap method in that it executes the provided $callback function on a copy of the collection; however, unlike the tap method, the pipe method returns the result of the callback function.The following example...

/blog/2021/12/12/creating-a-content-reaction-system-with-statamic-3-and-antlers#content-refactoring-our-partial-using-antlers-front-matter

Taking a look at the current state of our Antlers partial, we can see a lot of duplicate code starting to emerge. This problem will only get worse over time since we will be referencing those field names in a few places: once to create the buttons...

/blog/2013/10/29/getting-the-environment-name-in-laravel-4

Environments in Laravel 4 are a great way to develop your application and have it respond to the environment it is running in. For example, most applications have two environments that they will ever run in: local and production . You can think of...

/blog/2021/09/12/creating-a-customized-statamic-3-500-error-page#content-creating-a-custom-view-composer

Now that we've modified our site's error handler, we will create a custom view composer that will allow us to provide additional details to our site's error template. To do this, we will simply update our site's application service provider...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-with-wherein

The whereIn method is used to filter the collection based on a given $key and an array of the possible $values that the $key can have. The method also defines an optional $strict parameter, which when an argument with a truth value of true is...

/blog/2021/02/20/integrating-laravel-spark-and-statamic-3#content-creating-user-registration-and-login-pages

Before moving on with more of the Spark integration, let's create a page for users to register for new accounts, and a page for them to login. We will start this by creating two new Antlers templates (they can remain empty for now) at the...

/blog/2023/04/11/creating-a-simple-honeypot-field-in-laravel#content-setting-up-our-form-and-routes

To start, we will create a simple route within our routes/web.php file we can use as the action of our form: We named our route "submit" to make it easier to reference later when building our template. We will work with the...