Skip to content

Instantly share code, notes, and snippets.

View michtio's full-sized avatar
🏠
Working from home

Michael Thomas michtio

🏠
Working from home
View GitHub Profile
@michtio
michtio / m240101_custom-field-indexes.php
Created October 29, 2024 13:27
Custom Field Indexes on Craft 5
<?php
namespace craft\contentmigrations;
use Craft;
use craft\base\FieldInterface;
use craft\db\Migration;
use craft\db\Table;
use craft\helpers\Console;
use Throwable;
@michtio
michtio / index.twig
Created April 6, 2020 15:50
Craft CMS GraphQL Query for:
% for site in craft.app.sites.getAllSites() %}
{% if site.handle != 'main' %}
{% set schoolNetworkSettings = craft.globalSets()
.handle('networkSettings')
.siteId(site.id)
.with(['networkLogo'])
.one()
%}