Skip to content

Instantly share code, notes, and snippets.

View smayzes's full-sized avatar

Shawn Mayzes smayzes

View GitHub Profile
name: PHPUnit
on: [pull_request]
jobs:
phpunit:
container:
image: kirschbaumdevelopment/laravel-test-runner:8.3
services:
mysql:
image: mysql:latest
env:
@smayzes
smayzes / gist:76a802283ed11f7bd1f8e116f4a6dc62
Created December 1, 2018 15:51 — forked from ulrikkold/gist:6893632472eb07a8b15b
Using composer.json with private repositories (without using Packagist)
This is mostly a note to my own bad memory. I hope somebody else can use it, too.
When using composer to manage packages, and one or more of these packages (including the root project itself) is not registered on Packagist, then you must include an entry in the "repositories" array in your composer.json.
I am pretty sure this must be noted somewhere in the documentation, but I was not able to find it.
Example:
{
"name": "vendor/PackageA",
<?php
namespace App\Http\Resources;
use function foo\func;
use Illuminate\Http\Resources\Json\JsonResource;
class ClinicIndexResource extends JsonResource
{
/**
<?php
use App\Models\Clinic;
use Illuminate\Database\Seeder;
class ClinicSeeder extends Seeder
{
/**
* Run the database seeds.
*
@smayzes
smayzes / PatientSeeder.php
Last active March 29, 2018 19:50
ClinicSeeder.php
<?php
use App\Models\Patient;
use Illuminate\Database\Seeder;
class PatientSeeder extends Seeder
{
/**
* Run the database seeds.
*
<?php
use App\Models\Clinic;
use Faker\Generator as Faker;
$factory->define(Clinic::class, function (Faker $faker) {
return [
'name' => $faker->company,
'address' => $faker->address,
'city' => $faker->city,
<?php
use App\Models\Patient;
use Faker\Generator as Faker;
$factory->define(Patient::class, function (Faker $faker) {
return [
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'address' => $faker->address,
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientsTable extends Migration
{
/**
* Run the migrations.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateClinicTable extends Migration
{
/**
* Run the migrations.