Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Controllers;
use Sober\Controller\Controller;
class TemplateProgramme extends Controller
{
public function tabs()
{
@neilgilmour
neilgilmour / archive-event.blade.php
Created July 1, 2019 15:59
ACF download field in post archive template
@extends('layouts.app')
@section('content')
<div class="row">
<div class="col-md page-content">
<div class="page-header">
<h1>Events</h1>
</div>
@if (!have_posts())
@neilgilmour
neilgilmour / README.md
Last active May 29, 2019 21:34 — forked from scottpnelson/README.md
Automatic MySQL database setup for Roots projects from .env file contents.

About

This script is a fork which is tweaked to work with a typical Trellis + Bedrock project. It will automatically create a new MySQL database for you by reading your MySQL database name, host name, and user credentials from your .env file. This allows you to keep your database details safe, in a single location. This is useful in a development environment where you're using Trellis to provision and deploy to staging and production, but using something like Valet to serve your site locally.

Installation

  1. Download setup_mysql.sh to your site/scripts/ directory
  2. You can modify setup_mysql.sh to set the following:
    • ENV_FILE (the relative path to your .env file -- e.g. ENV_FILE="./.env.local")
  • DEFAULT_MYSQL_HOST (the host name of your MySQL server -- e.g. "localhost")