Sometimes you may wish to ignore a given ID during the unique check in Laravel. For example updating a name field on a profile page that has a unique field that is an email address.
How to modify the format settings on a redactor field in Statamic.
Wrap your code in a immediately invoked function expression (IFFE). It runs immediately when you create it and has no name. This creates a self contained module with its own scope.
Objects are stored in memory by reference, but there properties are stored by value.
Use a constructor function that returns an object. You can then create multiple instance of the object that share properties and methods.
Moving over to Homestead instead of MAMP Pro for my development environment has proven quite a task, this is how I got things working for my Statamic V1 and Craft 2.0 CMS sites.
PHP 5.3 introduced the concept of namespacing, this is a naming convention for your classes that avoids naming conflicts. Composer helps with namespacing by allowing us to use multiple packages that may or may not have the same class names. It also offers the ability to shorten long locations of class names by using a simple alias to shorten the directory path.
PHP 5 introduced autoloading which removed the requirement to keep including class files at the top of your working file. Autoloading also has a standard known as PSR4 which is used to define how autoloading should be used.
A look at the modern way to work with PHP which will allow us several advantages over the commonly used method of just having several includes throughout your code. One of which is the ability to manage our project library versions and dependencies.
Using Statamic to build web apps, which can handle membership and protected content.
This is a simple example to show you how easy it is to add a contact form in Statamic with Raven.
I recently attended the GeeUp conference in Leiden, and took advantage of a 1 day workshop for creating websites using Craft CMS here are my notes and links.
I recently got asked a question on twitter on how you could have content on your site which is protected behind a login area. Having never tried this sort of thing with Statamic, I thought it would be fun to have a go at creating a simple example. This article shows you how to set up a simple, secure, area where users are required to login to view content. Using the member tag in Statamic and some conditionals this is easy to do.
The more you use Statamic the more you love it, everything can be stored in one place and as long as you use a private repo you can store everything in your version control hosting tool of choice. In this post I will run through my workflow of moving site content and files seamlessly between Bitbucket, my local machine, development and production servers.
Sometimes you may want to have the comment count displayed in the header or footer of your post. This can be added in quite easily using Disqus' comment count script.
I am super excited to announce that as of the beginning of this week I am officially joining the Statamic team as Community Manager.
Working with the the location field type in Statamic you can easily create a dynamic location map displaying points of interest. This is an overview of how to get started.
A short video which explains the history of Typography, a really fantastic way to visually see how type has progressed over time.
This is a really simple way to display the current page you are on when using pagination.
Markdown is a really simple way of creating web-friendly text documents that you may ordinarily create using Microsoft Word then cut and paste into your website's CMS.
A Content Management System (CMS) is a tool which enables you to easily create content for your website. This article takes you through the basics of what a CMS is.
When you first install Statamic you may well come across the following: 'Error It is not safe to rely on the system's timezone settings.' Don't panic this is really easy to fix.