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
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
| <?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).+$/' | |
| ]; |
composer require guzzlehttp/guzzleDomains tab and click on domains.env setup
| 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 | |
| <?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', |
| /* | |
| * Force Bootstrap v4 transitions | |
| * (ignores prefers-reduced-motion media feature) | |
| * https://gist.github.com/robsonsanches/33c6c1bf4dd5cf3c259009775883d1c0 | |
| */ | |
| .fade { | |
| transition:opacity 0.15s linear !important; | |
| } | |
| .collapsing { |
| 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'}, |
| <?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. |