Skip to content

Instantly share code, notes, and snippets.

View morrislaptop's full-sized avatar

Craig Morris morrislaptop

View GitHub Profile
{
"scripts": {
"build": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
}
}
{
"buildpacks": [
{
"url": "heroku/php"
},
{
"url": "heroku/nodejs"
}
]
}
{
"scripts": {
"compile": [
"@php artisan route:cache",
"@php artisan event:cache",
"@php artisan view:cache"
]
}
}
if ($http_x_forwarded_proto != 'https') {
rewrite ^ https://$host$request_uri? permanent;
}
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /index.php$1 last;
}
web: vendor/bin/heroku-php-nginx -C nginx.conf public/
{
"addons": [
"heroku-postgresql",
"heroku-redis",
"scheduler"
]
}
<?php
namespace App\Bootstrap;
use Dotenv\Dotenv;
use Dotenv\Exception\InvalidFileException;
use Dotenv\Exception\InvalidPathException;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables as BaseLoadEnvironmentVariables;
@morrislaptop
morrislaptop / Sections.vue
Created July 5, 2018 14:49
A single file WordPress component
<acf>
return component('sections', [
'sub_fields' => [
repeater_field('sections', [
'sub_fields' => [
text_field('title'),
content_field('content', ['media_upload' => 1])
]
])
]
<?php
class ServeValetDriver extends ValetDriver
{
protected $sitePath;
protected $siteName;
protected $port;
/**
* Determine if the driver serves the request.
<?php
use Illuminate\Http\Request;
Route::get('/me', function (Request $request) {
return (array) $request->user();
})->middleware('auth:api');