$ npm install -g create-react-app
$ create-react-app my-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
| <?php | |
| $this->validate($request, [ | |
| 'phone' => 'regex:/^\+65(6|8|9)\d{7}$/', | |
| ]); | |
| // It will validate SG phone numbers without a required parameter in laravel using validator. |
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
| export const API_STATUS = { | |
| //1×× Informational | |
| AS_100: {'CODE':100,'DES': 'Continue'}, | |
| AS_101: {'CODE':101,'DES': 'Switching Protocols'}, | |
| AS_102: {'CODE':102,'DES': 'Processing'}, | |
| //2×× Success | |
| AS_200: {'CODE':200,'DES': 'OK'}, | |
| AS_201: {'CODE':201,'DES': 'Created'}, | |
| AS_202: {'CODE':202,'DES': 'Accepted'}, | |
| AS_203: {'CODE':203,'DES': 'Non-authoritative Information'}, |
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
| /* | |
| * Force Bootstrap v4 transitions | |
| * (ignores prefers-reduced-motion media feature) | |
| * https://gist.github.com/robsonsanches/33c6c1bf4dd5cf3c259009775883d1c0 | |
| */ | |
| .fade { | |
| transition:opacity 0.15s linear !important; | |
| } | |
| .collapsing { |
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 | |
| #API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = $_GET['id']; | |
| #prep the bundle | |
| $msg = array | |
| ( | |
| 'body' => 'Body Of Notification', |
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
| sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
| sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
| sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
- install Guzzle HTTP library :
composer require guzzlehttp/guzzle - [sign up to mailgun] (http://www.mailgun.com)
- Go to
Domainstab and click on domains - You will find the necessary data for
.envsetup- MAIL_DRIVER=mailgun
- MAIL_HOST=smtp.mailgun.org
- MAIL_PORT=587
- MAIL_USERNAME=postmaster@sandbox------------------------------6f.mailgun.org
- MAIL_PASSWORD=502fd951f7------------------------
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 | |
| /* | |
| * Place this with the rest of your rules. | |
| * Doesn't need to be in an array as there are no pipes. | |
| * Password is required with a minimum of 6 characters | |
| * Should have at least 1 lowercase AND 1 uppercase AND 1 number | |
| */ | |
| $rules = [ | |
| 'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/' | |
| ]; |
Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.
Source: When to use self vs this -stackoverflow