Skip to content

Instantly share code, notes, and snippets.

@masterpowers
masterpowers / laravel-lumen-5-homestead-win.md
Created March 19, 2016 19:25 — forked from prograhammer/laravel-lumen-5-homestead-win.md
Laravel/Lumen 5.1 Homestead for Windows (includes fixes for shared-folder related slowness, npm install problems, caching, etc)

Laravel / Lumen Homestead for Windows w/fixes

###Initial installation and configuration Install Git for Windows which includes Git Bash.

Install VirtualBox and Vagrant.

Note: These fixes were not originally done for VirtualBox 5.0 and Vagrant 1.7.4. They are for the previous versions instead: VirtualBox 4.3.30 and Vagrant 1.7.3. Some of these fixes may not be needed now. For example, I recently upgraded to VirtualBox 5.0 and Vagrant 1.7.4 and I did not have to alter the Vagrant ruby (.rb) files as shown in part of this Gist below. I'll soon try from a fresh install (not upgrade) and update this Gist accordingly.

In Git Bash (always run as administrator), type cd ~ to

@masterpowers
masterpowers / PjaxMiddleware.php
Created February 20, 2016 01:24 — forked from JeffreyWay/PjaxMiddleware.php
Laravel middleware for working with pjax.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
@masterpowers
masterpowers / OTF.php
Created January 2, 2016 14:38 — forked from lukevers/OTF.php
Laravel 5 On The Fly Database Connections
<?php namespace App\Database;
use Config;
use DB;
class OTF {
/**
* The name of the database we're connecting to on the fly.
*
@masterpowers
masterpowers / app.css
Created November 29, 2015 12:57 — forked from koba04/app.css
socket.io chat sample by vue.js http://socket.io/get-started/chat/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font: 13px Helvetica, Arial;
}
@masterpowers
masterpowers / laravel-ums.markdown
Last active August 29, 2015 14:26 — forked from anchetaWern/laravel-ums.markdown
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@masterpowers
masterpowers / dashboard.twig.php
Last active August 29, 2015 14:26 — forked from beanmoss/dashboard.twig.php
LARAVEL: Displaying different module/package dashboard widgets using view composers.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Laravel PHP Framework</title>
<style>
@import url(//fonts.googleapis.com/css?family=Lato:700);
body {
margin:0;