This file contains 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 | |
/** | |
* Dump helper. Functions to dump variables to the screen, in a nicley formatted manner. | |
* @author Joost van Veen | |
* @version 1.0 | |
*/ | |
if (!function_exists('dump')) { | |
function dump ($var, $label = 'Dump', $echo = TRUE) | |
{ | |
// Store dump in variable |
This file contains 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 MatchesControllerTest extends TestCase | |
{ | |
protected $user; | |
protected $profile; | |
public function setUp() | |
{ | |
parent::setUp(); | |
DB::beginTransaction(); |
This file contains 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 TestCase extends Illuminate\Foundation\Testing\TestCase { | |
/** | |
* Creates the application. | |
* | |
* @return Symfony\Component\HttpKernel\HttpKernelInterface | |
*/ | |
public function createApplication() |
This file contains 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
//Routes.php | |
Route::get('/matches',['uses' => 'MatchesController@index']); | |
//BaseController.php | |
BaseController extends Controller{ | |
function __construct() | |
{ | |
// call task for update cloudsearch if there are updated gigmor profiles | |
// not best place to do it. | |
CloudSearch::updateProfiles(); |
This file contains 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
1. laravel.com/docs | |
2. laravel.io | |
3. laravel-tricks.com | |
4. laracasts.com | |
5. laravel-recipes.com | |
6. cheats.jesse-obrien.ca | |
7. laravelweekly.com | |
8. http://fideloper.com | |
9. http://jasonlewis.me | |
10. http://culttt.com/search/?q=laravel |
This file contains 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
http://tutorialzine.com/ | |
http://teamtreehouse.com/dashboard https://tutsplus.com/ | |
http://hub.tutsplus.com/ | |
http://www.codeschool.com/ https://peepcode.com/screencasts | |
http://www.udemy.com/ | |
http://learncodethehardway.org/ | |
http://www.programr.com/ | |
http://www.codecademy.com/#!/exercises/0 | |
http://www.bloc.io/ | |
https://www.phpacademy.org/ |
This file contains 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
#!/usr/bin/env bash | |
# Upgrade Base Packages | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Install Web Packages | |
sudo apt-get install -y build-essential dkms re2c apache2 php5 php5-dev php-pear php5-xdebug php5-apcu php5-json php5-sqlite \ | |
php5-mysql php5-pgsql php5-gd curl php5-curl memcached php5-memcached libmcrypt4 php5-mcrypt postgresql redis-server beanstalkd \ | |
openssh-server git vim python2.7-dev |
This file contains 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
//Debugging through | |
//Band > music > likes > user | |
"select * from `band_profile` where `id` = ? limit 1" | |
"select * from `music_asset` where `music_asset`.`profile_id` = ? and `music_asset`.`profile_type` = ? and `type` = ?" | |
"select * from `likes` where `likes`.`object_id` = ? and `likes`.`object_type` = ?" | |
"select * from `likes` where `likes`.`object_id` = ? and `likes`.`object_type` = ? and `user_id` = ? limit 1" | |
4 query run @ combined |
This file contains 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
//required it in global.php | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
// use it as usual: | |
$rules = array('name' => 'required|alpha_spaces'); |
OlderNewer