Skip to content

Instantly share code, notes, and snippets.

View iolson's full-sized avatar

Ian Olson iolson

  • Grubhub
  • Chicago, IL
View GitHub Profile
<?php
namespace AdvisorsExcel\ImportBundle\Entity;
/**
* Class EntityPlus
*
* Parent class for generic Doctrine entities that provides a convenience method for populating the entity
* from an associative array.
*/
@iolson
iolson / AuthenticateController.php
Last active December 4, 2022 23:24
SentinelAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentinel
<?php namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
class AuthenticateController extends Controller
{
@iolson
iolson / AuthTest.php
Created June 20, 2015 23:35
Laravel 5.1 Package Testing
<?php
/**
* @package Dashboard
* @version 1.0.0
* @author Ian Olson <ian@odotmedia.com>
* @license MIT
* @copyright 2015, Odot Media LLC
* @link https://odotmedia.com
*/
@iolson
iolson / index.blade.php
Created July 17, 2015 02:57
Using Vue inside my
@extends($viewNamespace . '::layouts.master')
@section('title', 'Dashboard')
@section('page-title', 'Dashboard')
@section('page-subtitle', '')
@section('content')
<div class="box">
<div class="box-body" id="form">
{!! BootForm::open()->post()->action(route('users.index')) !!}
{!! BootForm::text('First Name', 'first_name') !!}
<div v-repeat="items" class="form-group">
@iolson
iolson / .bash_profile
Created July 22, 2015 17:54
Bash Profile
# Quicker navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
alias .......="cd ../../../../../.."
# Aliases
alias ll='ls -l'
@iolson
iolson / passwordvalidation
Last active August 29, 2015 14:25 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.
@iolson
iolson / .bash_profile
Created July 23, 2015 23:52
New Package
alias newpackage='git clone git@github.com:laraflock/skeleton.git newpackage && rm -rf newpackage/.git'
<?php
namespace App\Http\Controllers\Dashboard;
use App\Repositories\Setting\SettingRepositoryInterface as Setting;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;
use Laracasts\Flash\Flash;
@iolson
iolson / README.md
Created August 4, 2015 17:38
Get Ramped Up on Laravel

Homestead

$ composer global require "laravel/homestead=~2.0"
$ homestead init
$ homestead edit
$ homestead up

Default Database

# Before Script
before_script:
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
# Variables
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: homestead