Valet switch PHP version with these commands
Install PHP 5.6 and switch Valet to PHP 5.6
valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
```language | |
Object.flatten = function(obj){ | |
var result = {}; | |
function recurse(src, prop) { | |
var toString = Object.prototype.toString; | |
if (toString.call(src) == '[object Object]') { | |
var isEmpty = true; | |
for (var p in src) { | |
isEmpty = false; |
module.exports = { | |
root: true, // make to not take in any user specified rules in parent folders | |
parser: 'babel-eslint', | |
extends: ['airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'], | |
env: { | |
browser: true, | |
node: true, | |
jest: true, | |
}, | |
plugins: ['flowtype'], |
#!/bin/bash | |
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04 | |
sudo apt-get update | |
sudo apt-get install default-jdk | |
sudo apt-get install unzip | |
cd /opt | |
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip | |
sudo unzip apache-tomcat-8.5.15.zip | |
sudo mv apache-tomcat-8.5.15 tomcat |
#!/usr/bin/env bash | |
echo ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
The following steps are required for a typical web developer stack for php and some front-end development. This is for a developer machine and not for a live environment!
<scheme name="One Dark" version="142" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="12" /> | |
<option name="CONSOLE_FONT_NAME" value="Monospaced" /> | |
<option name="EDITOR_FONT_NAME" value="Menlo" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="abb2bf" /> | |
<option name="ANNOTATIONS_COLOR" value="ffffff" /> | |
<option name="ANNOTATIONS_MERGED_COLOR" value="ffffff" /> | |
<option name="CARET_COLOR" value="61afef" /> |
<?php | |
function showModal($id, array $data = []) | |
{ | |
$toJSON = json_encode($data); | |
return "showModal('$id', $toJSON)"; | |
} |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |