- Create droplet with Ubuntu 18.10
ssh root@[DROPLET IP ADDRESS]
- Get password from your email
- Change password on first login
adduser laravel
- Enter password and other 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
//login method | |
public function processLogin() | |
{ | |
$validator = Validator::make(request()->all(), [ | |
'email' => 'required|email', | |
'password' => 'required', | |
]); | |
if ($validator->fails()) { | |
return redirect()->back()->withErrors($validator)->withInput(); | |
} |
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 | |
//Basis Knowledge Test: | |
//========================== | |
//1. Write a PHP function that to remove all zeroes from a string and return 3 different output. | |
//Input String : '000892021.2408000' | |
//Expected below outputs | |
//Output 1: '892021.2408' (all zeros remove from start and end) | |
//Output 2: '892021.2408000' (remove only start zero) | |
//Output 3: '000892021.2408' (remove only end zero) |
A Lightweight and easy-to-use WordPress Options Framework. It is a free framework for building theme options. Save your time!
Read the documentation for details documentation
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
public function processOrder() | |
{ | |
$validator = Validator::make(request()->all(),[ | |
'customer_name' => 'required', | |
'customer_phone_number' => 'required', | |
'address' => 'required', | |
'city' => 'required', | |
'postal_code' => 'required', | |
]); | |
if ($validator->fails()){ |
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 | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
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
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
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
# Created by https://www.gitignore.io/api/vue,laravel,phpstorm,visualstudiocode | |
# Edit at https://www.gitignore.io/?templates=vue,laravel,phpstorm,visualstudiocode | |
### Laravel ### | |
/vendor/ | |
node_modules/ | |
npm-debug.log | |
yarn-error.log |
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
# Created by https://www.gitignore.io/api/phpstorm,wordpress | |
# Edit at https://www.gitignore.io/?templates=phpstorm,wordpress | |
### PhpStorm ### | |
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | |
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | |
# User-specific stuff | |
.idea/**/workspace.xml |
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
/** | |
* Time to human readable time | |
* | |
* @param $ts | |
* @param string $fallback_format | |
* | |
* @return false|string | |
*/ | |
public function time2str( $ts, $fallback_format = 'M j, Y H:i' ) { | |
if ( ! ctype_digit( $ts ) ) { |
OlderNewer