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 | |
| public function search() | |
| { | |
| $ret->with('territory')->with('homeClub')->with('awayClub'); | |
| $ret->whereHas('territory',function( $query ){ | |
| $query->where('region','Australia'); | |
| }) |
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
| protected $routeMiddleware = [ | |
| 'check_user_role' => \App\Http\Middleware\CheckUserRole::class, | |
| 'check_product_ownership' => \App\Http\Middleware\CheckProductOwnership::class, | |
| ]; |
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
| protected $routeMiddleware = [ | |
| 'check_user_role' => \App\Http\Middleware\CheckUserRole::class, | |
| 'check_product_ownership' => \App\Http\Middleware\CheckProductOwnership::class, | |
| ]; |
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
| git checkout featurebranch && git rebase master |
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
| You could update your index: | |
| cd /root/folder/of/your/repo | |
| git update-index --assume-unchanged nbproject/project.properties | |
| and make sure it never shows as "updated" in your current repo. | |
| That means it won't ever been pushed, but it is still present in the index. | |
| (and it can be modified at will in your local working tree). |
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
| https://github.com/git-tips/tips |
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 Restaurant extends Eloquent | |
| { | |
| // Relations here | |
| public function scopeHasWifi($query) | |
| { | |
| return $query->whereHas('facilities', function($query) { | |
| return $query->where('wifi', true); |
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
| var obj = {name: "upin", email: "[email protected]", role_id: "1"}; | |
| delete obj.email; | |
| //will produce {name: "upin", role_id: "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
| //check list of available remote branch | |
| git branch -a | |
| git clone -b <branch> <remote_repo> | |
| //example | |
| git clone -b my-branch [email protected]:user/myproject.git |
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
| (function() { | |
| 'use strict'; | |
| angular | |
| .module('app') | |
| .directive('wmBlock', wmBlock) | |
| .directive('pwCheck', pwCheck); | |
| function wmBlock() { | |
| return { |