Skip to content

Instantly share code, notes, and snippets.

View morrislaptop's full-sized avatar

Craig Morris morrislaptop

View GitHub Profile
<?php
namespace App\Support;
use Blueprint\Models\Model;
use Illuminate\Support\Str;
use Blueprint\Generators\ModelGenerator as BaseModelGenerator;
class ModelGenerator extends BaseModelGenerator
{
models:
Build:
project_id: id
sha: string
message: string
ref: string
committed_at: datetime
build_started_at: datetime nullable
build_finished_at: datetime nullable
output: text nullable
<?php
namespace App\Http\Controllers;
use PHPUnit\Framework\TestCase;
class ControllerTest extends TestCase
{
/**
* A basic test example.
return [
'url' => env('APP_URL', env('HEROKU_APP_NAME') ? 'https://' . env('HEROKU_APP_NAME') . '.herokuapp.com' : 'http://localhost'),
'key' => strpos(env('APP_KEY'), 'base64:') !== false ? env('APP_KEY') : substr(env('APP_KEY'), 0, 32),
];
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST'),
'port' => env('DB_PORT'),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'charset' => 'utf8',
'prefix' => '',
{
"environments": {
"test": {
"scripts": {
"test-setup": "php artisan migrate --seed",
"test": "vendor/bin/phpunit --printer gh640\\\\PhpunitTap\\\\TapResultPrinter"
}
}
}
}
<?php
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
{
"env": {
"APP_NAME": "my-laravel-app",
"APP_ENV": "review",
"APP_KEY": {
"generator": "secret"
},
"APP_DEBUG": "true",
"LOG_CHANNEL": "errorlog",
"DB_CONNECTION": "pgsql",
{
"env": {
"DB_CONNECTION": "pgsql",
"QUEUE_CONNECTION": "redis",
"CACHE_DRIVER": "redis",
"SESSION_DRIVER": "redis",
"LOG_CHANNEL": "errorlog",
"APP_KEY": {
"generator": "secret"
}
{
"scripts": {
"postdeploy": [
"php artisan db:seed",
"php artisan passport:client --personal"
]
}
}