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
cd /home/forge/<DIRECTORY_NAME> | |
# Deploy Start Message | |
echo "Deploying application to $FORGE_SITE_BRANCH branch at $FORGE_SITE_PATH..." | |
# Git | |
git pull origin $FORGE_SITE_BRANCH | |
# Production optimized composer install | |
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader |
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 | |
namespace App\Traits; | |
use Illuminate\Support\Facades\Crypt; | |
trait EncryptAble | |
{ | |
/** | |
* If the attribute is in the encryptable array |
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 | |
namespace App\Traits; | |
use Spatie\QueryBuilder\QueryBuilder; | |
use Spatie\QueryBuilder\AllowedFilter; | |
trait QueryModel | |
{ | |
// Get Fillable Fields |
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 | |
$countries = array( | |
"AF" => "Afghanistan", | |
"AX" => "Aland Islands", | |
"AL" => "Albania", | |
"DZ" => "Algeria", | |
"AS" => "American Samoa", | |
"AD" => "Andorra", | |
"AO" => "Angola", |
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
<!-- https://mycyberuniverse.com/speeding-website-using-dns-prefetching.html --> | |
<!-- Google CDN --> | |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> | |
<!-- Google API --> | |
<link rel="dns-prefetch" href="//apis.google.com"> | |
<!-- Google Fonts --> | |
<link rel="dns-prefetch" href="//fonts.googleapis.com"> |
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
import json | |
import boto3 | |
print('Loading function') | |
s3 = boto3.resource('s3') | |
def lambda_handler(event, context): | |
for bucket in s3.buckets.all(): |
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
import json | |
import boto3 | |
print('Loading function') | |
s3 = boto3.resource('s3') | |
def lambda_handler(event, context): | |
for bucket in s3.buckets.all(): |
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
#Clone your project from git | |
composer install | |
npm install | |
copy .env.example .env | |
OR | |
cp .env.example .env | |
php artisan key:generate |
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
# GIT MERGE OPTIONS DEPENDING HOSTING OR DEPLOYMENT PROVIDERS | |
# git checkout -- . | |
# git checkout . | |
# git merge | |
# php artisan down || true | |
# Put the application into maintenance / demo mode | |
php artisan down | |
# GIT Clear current generated files so can pull new ones |
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
[build] | |
command = "./vendor/bin/jigsaw build production" | |
publish = "build_production" | |
[build.environment] | |
PHP_VERSION=7.2 | |
# Just use major releases like 7.1, 7.2, 7.3 |
NewerOlder