Before proceed, you may want to follow up
- Send Welcome Email Notification with Event and Listener and
- Enable Account Activation in Order to Login to the System
Create a middleware
#!/bin/sh | |
# Create initial directories and files for home automation stack. | |
BASE_DIR=$(pwd) | |
ESPHOME_DIR=$BASE_DIR/esphome | |
HASS_DIR=$BASE_DIR/hass | |
MOSQUITTO_DIR=$BASE_DIR/mosquitto | |
NODE_RED_DIR=$BASE_DIR/node-red |
#!/bin/sh | |
# If you would like to do some extra provisioning you may | |
# add any commands you wish to this file and they will | |
# be run after the Homestead machine is provisioned. | |
wget https://xdebug.org/files/xdebug-2.5.5.tgz | |
tar xvzf xdebug-2.5.5.tgz | |
cd xdebug-2.5.5 | |
phpize |
# fail2ban filter configuration for nginx | |
# Detects SSL Handshake Failures | |
[Definition] | |
failregex = \[crit\] \d+\#\d+: \*\d+ SSL_do_handshake\(\) failed \(SSL: error:1417D18C:SSL routines:tls_process_client_hello:version too low\) while SSL handshaking, client: <HOST>, server: \S*\s*$ | |
ignoreregex = |
/* | |
By: Arief Hikam | |
Laravel Sorting from another table with Eloquent | |
Sometimes it is difficult to perform sorting by Eloquent because relationships do not use the JOIN in query builder but use | |
Eager Load which mean we can not sorting by another table field because the field is doesn't exist. | |
This is how we use the simple code Eloquent and sorting another table by using LEFT JOIN. | |
I think this is the simplest way I can think of. |
Before proceed, you may want to follow up
Create a middleware
Before proceed, you may want to follow up Send Welcome Email Notification with Event and Listener.
Create new migration script to add activation_token
and activated_at
column in users
table.
php artisan make:migration add_activation_column --table=users
Requires https://github.com/yohang/Finite
<?php
class StatefulModel extends Model
{
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip