Skip to content

Instantly share code, notes, and snippets.

View hoofdletterj's full-sized avatar

Jarno Dijkstra hoofdletterj

View GitHub Profile
@hoofdletterj
hoofdletterj / checkbox.dynamic.blade.php
Last active December 25, 2019 14:46
Blade form elements for sharing on create and edit forms
@foreach ($tags as $tag)
<input
type="checkbox"
name="tag[]"
value="{{$tag->id}}"
{{
empty(old())
? (in_array($tag->id, $userTagIDs) ? 'checked' : '')
: (is_array(old('tag')) && in_array($tag->id, old('tag')) ? 'checked' : '')
}}
@hoofdletterj
hoofdletterj / nginx_sites-available_default-indexphp
Created July 31, 2018 11:36
Deploy Laravel 5.6 in a LEMP environment - a complete guide
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/app/public;
index.php index index.html index.htm index.nginx-debian.html;
server_name 001.001.001.001;