- install Guzzle HTTP library :
composer require guzzlehttp/guzzle
- [sign up to mailgun] (http://www.mailgun.com)
- Go to
Domains
tab and click on domains - You will find the necessary data for
.env
setup- MAIL_DRIVER=mailgun
- MAIL_HOST=smtp.mailgun.org
- MAIL_PORT=587
- MAIL_USERNAME=postmaster@sandbox------------------------------6f.mailgun.org
- MAIL_PASSWORD=502fd951f7------------------------
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 | |
$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 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
-- | |
-- Table structure for table `countries` | |
-- | |
DROP | |
TABLE IF EXISTS `countries`; | |
CREATE TABLE `countries` ( | |
`id` int NOT NULL AUTO_INCREMENT, | |
`name` varchar(80) NOT NULL, | |
`iso` char(2) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, |
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
/** | |
* Code goes in functions.php or a custom plugin. | |
*/ | |
/** | |
* @snippet Disable Order notification For Specific Payment Gateway | |
* @author Ashiqur Rahman | |
*/ | |
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
/** | |
* Code goes in functions.php or a custom plugin. | |
*/ | |
add_action( 'woocommerce_email', 'unhook_those_pesky_emails' ); | |
function unhook_those_pesky_emails( $email_class ) { | |
/** | |
* Hooks for sending emails during store events | |
**/ |
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
/* | |
* Force Bootstrap v4 transitions | |
* (ignores prefers-reduced-motion media feature) | |
* https://gist.github.com/robssanches/33c6c1bf4dd5cf3c259009775883d1c0 | |
*/ | |
.fade { | |
transition:opacity 0.15s linear !important; | |
} | |
.collapsing { |
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 | |
/* | |
* 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).+$/' | |
]; |
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
-- -- Table structure for table `states` -- | |
CREATE TABLE IF NOT EXISTS `states` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=38 ; | |
-- -- Dumping data for table `states` -- | |
INSERT INTO `states` (`state_id`, `name`) VALUES (1, 'Abia State'), (2, 'Adamawa State'), (3, 'Akwa Ibom State'), (4, 'Anambra State'), (5, 'Bauchi State'), (6, 'Bayelsa State'), (7, 'Benue State'), (8, 'Borno State'), (9, 'Cross River State'), (10, 'Delta State'), (11, 'Ebonyi State'), (12, 'Edo State'), (13, 'Ekiti State'), (14, 'Enugu State'), (15, 'FCT'), (16, 'Gombe State'), (17, 'Imo State'), (18, 'Jigawa State'), (19, 'Kaduna State'), (20, 'Kano State'), (21, 'Katsina State'), (22, 'Kebbi State'), (23, 'Kogi State'), (24, 'Kwara State'), (25, 'Lagos State'), (26, 'Nasarawa State'), (27, 'Niger State'), (28, 'Ogun State'), (29, 'Ondo State'), (30, 'Osun State'), (31, 'Oyo State'), (32, 'Plateau State'), (33, 'Rivers State'), (34, 'Sokoto |
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
/** | |
* Display a listing of the Relation resource. | |
* | |
* @return \Illuminate\Http\Response | |
*/ | |
public function getRelations() | |
{ | |
$relations = Relation::with('dbtranslations')->get(); | |
if ($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? 'en' != 'en') { |
NewerOlder