- Spin up a new App server, choose PHP 8
- SSH into it and run
sudo -ito become root - Run
pecl install swooleand enable what you need. (I disabled curl as it did not work for me) - Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
- Point your DNS to your new site
- Enable SSL using Lets Encrypt
- Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
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 | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\File; | |
| class extractTranslationStrings extends Command | |
| { |
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
| <IfModule mod_rewrite.c> | |
| <IfModule mod_negotiation.c> | |
| Options -MultiViews | |
| </IfModule> | |
| RewriteEngine On | |
| # Redirect Trailing Slashes If Not A Folder... | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.*)/$ /$1 [L,R=301] |
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 | |
| namespace your\namespace; | |
| use Symfony\Component\VarDumper\Dumper\CliDumper; | |
| use Symfony\Component\VarDumper\Cloner\VarCloner; | |
| use Symfony\Component\VarDumper\Dumper\HtmlDumper; | |
| class Dumper | |
| { |
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 | |
| class PageController extends \App\Http\Controllers\Controller | |
| { | |
| public function show() | |
| { | |
| $slug = request()->segment(1); | |
| $page = \TCG\Voyager\Models\Page::where('slug', $slug) | |
| ->firstOrFail(); | |
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
| # see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/ | |
| # --- Compiling --- | |
| $ yum install gcc make tcl | |
| $ REDIS_VER=3.2.3 | |
| $ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz | |
| $ tar xzvf redis-$REDIS_VER.tar.gz | |
| $ cd redis-$REDIS_VER | |
| $ make | |
| $ make test |
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 | |
| /*** | |
| *** Custom Email Template | |
| ****/ | |
| function um_custom_email_template(){ | |
| global $ultimatemember, $user_ID; | |
| um_fetch_user( $user_ID ); |
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
| /* WC HPD */ | |
| //manage_product_posts_custom_column | |
| add_filter( 'manage_edit-product_columns', 'products_customcol_fn' ); | |
| function products_customcol_fn($columns){ | |
| $new_columns = (is_array($columns)) ? $columns : array(); | |
| $new_columns['HPD'] = 'hpd'; | |
| return $new_columns; | |
| } | |
| add_action( 'manage_product_posts_custom_column', 'products_customcol_value_fn', 2 ); |
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
| $gravity_form_id = 6; // gravity form id, or replace {$gravity_form_id} below with this number | |
| add_filter("gform_after_submission_{$gravity_form_id}", 'jdn_set_post_acf_gallery_field', 10, 2); | |
| function jdn_set_post_acf_gallery_field($entry, $form) | |
| { | |
| $gf_images_field_id = 42; // the upload field id | |
| $acf_field_id = 'field_54804833b3067'; // the acf gallery field id | |
| // get post |
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
| # ----------------------------------------------------------------- | |
| # .gitignore for WordPress | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20150227 | |
| # | |
| # This file is tailored for a WordPress project | |
| # using the default directory structure | |
| # | |
| # This file specifies intentionally untracked files to ignore |
NewerOlder