Skip to content

Instantly share code, notes, and snippets.

View Sprocket's full-sized avatar

Duncan Heal Sprocket

View GitHub Profile
@Sprocket
Sprocket / gist:7686650
Last active December 29, 2015 14:49
Laravel helper functions to test for local or production environments.
/**
* test for local environment
* @param string $env name of environment to test
* @return boolean
*/
function isLocal($env = 'local')
{
return app()->environment() == $env;
}
@Sprocket
Sprocket / laravel-ums.markdown
Created December 6, 2012 20:39 — 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
@Sprocket
Sprocket / currency-sprintf.php
Created August 7, 2012 08:57
php: Currency formatted sprintf
sprintf('%.2f', 1234);