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 UsersController extends Controller | |
| { | |
| public function deleteUser($id,Request $request) | |
| { | |
| try { | |
| $user = User::findOrFail($id); | |
| //only allowed delete user that have no evaluation |
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 ApplicantController extends Controller | |
| { | |
| public function index(Request $request) | |
| { | |
| $status = array_map('intval',explode(',',$request->input('status'))); | |
| $sortBy = $request->has('sort') ? $request->input('sort') : 'id'; | |
| $limit = $request->has('limit') ? $request->input('limit') : self::$paginationLimit; |
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 can't merge with local modifications. Git protects you from losing potentially important changes. | |
| You have three options. | |
| 1. Commit the change using | |
| git commit -m "My message" | |
| 2. Stash it. | |
| Stashing acts as a stack, where you can push changes, and you pop them in reverse order. |
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
| put this .gitignore into the folder, then git add .gitignore | |
| * | |
| */ | |
| !.gitignore | |
| The * line tells git to ignore all files in the folder, but !.gitignore tells git to still include the .gitignore file. This way, your local repository and any other clones of the repository all get both the empty folder and the .gitignore it needs. | |
| Edit: May be obvious but also add */ to the git ignore to also ignore sub folders. |
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
| NOTE: THIS ONE WILL NOT REMOVE THE FILE FROM MASTER REPO, BUT REMOVE FROM CHANGES | |
| git checkout origin/master <path_to_file> | |
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 | |
| //set foreign key to null | |
| $table->integer('country_id')->nullable()->unsigned(); | |
| $table->integer('state_id')->nullable()->unsigned(); | |
| //set foreign key with references |
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
| DiscussionController.$inject = ['$rootScope', '$scope', '$stateParams','userService','$timeout','discussionService','$uibModal', '$state', 'localStorageService', 'evalService']; | |
| function DiscussionController($rootScope, $scope, $stateParams, userService, $timeout, discussionService, $uibModal, $state, localStorageService, evalService) { | |
| var vm = this; | |
| vm.timeAgo = timeAgo; | |
| //convert date with moment | |
| function timeAgo(date){ |
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
| http://www.restapitutorial.com/httpstatuscodes.html |
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/johnpapa/angular-styleguide/ |
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/ghiscoding/angular-validation |