Skip to content

Instantly share code, notes, and snippets.

View leitom's full-sized avatar

Tommy Leirvik leitom

View GitHub Profile
@leitom
leitom / Http.php
Created June 27, 2017 11:54
Zonda?
<?php
trait Http
{
function wrapGuzzle($guzzle)
{
return new class($guzzle) {
private $guzzle;
public function __construct($guzzle)
@leitom
leitom / OauthHelper.php
Last active October 15, 2016 13:10
Simple helper function for creating user with access token in laravel 5.3 with passport
<?php
use Laravel\Passport\ClientRepository;
train OauthHelper
{
public function getOauthUser($password = 'secret', array $attributes = [])
{
$user = factory(App\User::class)->create(
array_merge($attributes, ['password' => bcrypt($password),])