Skip to content

Instantly share code, notes, and snippets.

trait DocumentTrait
{
public function markSent()
{
$this->status = 1;
$this->save();
}
public function markDecision($data)
{
try
{
$this->newInvoice->insert($data, 'store');
}
catch(ValidationException $e){
$fixedInputs = Input::except($this->newInvoice->arrayInputs);
$arrayInputs = Input::only($this->newInvoice->arrayInputs);
$arrayInputs = Sort::getArrayInputs($arrayInputs);
return Redirect::back()
Mail::send('emails.upgraded', $data, function($message)
{
$message->to($user->email, $user->first_name)
->subject('Your account has been upgraded. Mom is proud!');
});
<?php
namespace YourProject\Services\Mailers;
abstract class Mailer
{
public function emailTo($person, $view, $data, $subject)
{
\Mail::send($view, $data, function($message) use($person, $subject)
{
<?php
namespace YourProject\Services\Mailers;
class UserMailer extends Mailer
{
protected $user;
function __construct()
{
<?php
use YourProject\Services\Mailers\UserMailer;
class UsersController extends BaseController
{
protected $mail;
function __construct(UserMailer $mail)
{
object(HelloSign\SignatureRequest)[619]
protected 'resource_type' => string 'signature_request' (length=17)
protected 'signature_request_id' => null
protected 'requester_email_address' => null
protected 'is_complete' => boolean false
protected 'has_error' => boolean false
protected 'files_url' => null
protected 'signing_url' => null
protected 'details_url' => null
protected 'cc_email_addresses' =>
@nonlocalize
nonlocalize / DiscogsTest.php
Created September 28, 2015 14:41
First foray into TDD with some very basic tests for a custom CMS/website I'm making for a client.
<?php
use App\guyj\Discogs\Discogs;
class DiscogsTest extends \TestCase
{
public function setUp()
{
$this->discogs = new Discogs('guy-j-dizzy-moments-diaspora');
}
<template>
<base-dropdown
:name="name"
:dropdown-ref="name"
:active="active"
dropdown-class="left-0 top-1 h5 overflow-y-scroll">
<span slot="label" class="fw6 sans-serif">{{ label }} <i class="ml2 zmdi zmdi-caret-down"></i></span>
<div slot="options">
<ul class="list ma0 pl0">
<li @click="setParentTeam('')" class="pointer hover-bg-black-05 bb b--black-10 pa3 w5">All MLB</li>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.