- GET request to /api/users – List all users
- GET request to /api/users/1 – List info for user with ID of 1
- POST request to /api/users – Create a new user
- PUT request to /api/users/1 – Update user with ID of 1
- DELETE request to /api/users/1 – Delete user with ID of 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='apps'></div> | |
<hr> | |
<script> | |
var account = {{ json_encode(to_json($account)) }}, | |
meets = {{ json_encode(to_json($meets)) }}; | |
</script> | |
@include("account.page.premium.app") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require, exports){ | |
//////////////////////////////////////////////////////////////////////////////// | |
// http://jshint.com/ | |
exports.javascript = {}; | |
exports.javascript.cmd = '/usr/local/bin/node "%s/jshint/bin/jshint"'; | |
exports.javascript.re = function(data){ | |
var result = []; | |
data.split('\n').forEach(function(element){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : false, // true: Identifiers must be in camelCase | |
"curly" : true, // true: Require {} for every new block or scope |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Api | |
{ | |
public static function is_eloquent($obj) | |
{ | |
if (is_array($obj)) { | |
$obj = isset($obj[0]) ? $obj[0] : $obj; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('test', function() { | |
$schema = SqlMigrations::convert('clouddueling') | |
->up(' | |
$user = User::create([ | |
"email" => "[email protected]", | |
"password" => Hash::make("admin"), | |
"admin" => 1 | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "base" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
config.vm.network :forwarded_port, guest: 80, host: 5472 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Analyze | |
{ | |
/** | |
* You can either scan your entire project or select some folders. | |
* | |
* @var array | |
*/ | |
public static $dirs = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gu () { | |
if [ "$1" ] | |
then | |
message=$1 | |
else | |
message="update code" | |
fi | |
git add -A && git commit -m "$message" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Api_V1_Address_Controller extends Base_Controller | |
{ | |
public function post_index() | |
{ | |
try { | |
$s = extend(array( | |
'name' => '', | |
'address_1' => '', |