Skip to content

Instantly share code, notes, and snippets.

<?php
$my_array = array("red","green","blue","yellow","purple");
shuffle($my_array);
print_r($my_array);
?>
DB::table('users')
->where('name', '=', 'John')
->orWhere(function($query)
{
$query->where('votes', '>', 100)
->where('title', '<>', 'Admin');
})
->get();
///////////////////////////////////////////////////////////////////
// PHP
// Just create your routes for Auth, and this one to return a token
///////////////////////////////////////////////////////////////////
// route:
Route::get('/auth/token', 'App\Modules\Auth\Controllers\AuthController@token');
// controller action
class AuthController extends \BaseController{
public function token()
http://laravel.com/docs/html#csrf-protection
http://www.stockt-shirtdesigns.com/skeleton-hand-holding-anatomical-red-heart-with-free-tee-design/
http://www.coolphptools.com/color_extract
@syads321
syads321 / gist:587a16c8b275ce8998bc
Created June 10, 2014 08:34
Laravel Angular Login
http://blog.neoxia.com/laravel4-and-angularjs/
@syads321
syads321 / gist:361552809582c0531d19
Last active August 29, 2015 14:02
Csrf Token Using Ajax
http://www.keltdockins.com/blog/laravel-4-csrf-token-and-ajax-using-jquery
Angular way :
`$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.
The defaults can also be set at runtime via the $http.defaults object in the same fashion. For example:
module.run(function($http) {
$http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
});
http://www.smartfren.com/css/img/uploaded/Update_Modem/Tabel_04_rev5.jpg
@syads321
syads321 / CSS
Created June 13, 2014 04:19
List of css tricks
http://s.bootply.com/render/cJJiNPzvy6#
Boostrap with diffrent height