Last active
February 27, 2021 23:40
-
-
Save LukeTowers/7eff55ed739a9cf2ae223b98ac67f642 to your computer and use it in GitHub Desktop.
OctoberCMS Tricks
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
/bootstrap/compiled.php | |
/vendor | |
composer.phar | |
.DS_Store | |
.idea | |
.env | |
.env.*.php | |
.env.php | |
php_errors.log | |
nginx-error.log | |
nginx-access.log | |
nginx-ssl.access.log | |
nginx-ssl.error.log | |
php-errors.log | |
sftp-config.json | |
selenium.php | |
# for netbeans | |
nbproject | |
# Exclude the OctoberCMS module folders from being included, they're pulled in via composer | |
/modules/** | |
# Exclude the builder plugin | |
plugins/rainlab/builder | |
# Exclude the symlinked public directory | |
public/ | |
# Exclude the autogenerated class file caches | |
/storage/framework/packages.php | |
/storage/framework/classes.php | |
/storage/framework/services.php |
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
# Install the project dependencies | |
composer install; | |
# Enable Maintenance Mode | |
php artisan down; | |
# Run any pending migrations (including initial migrations if this is a clean database) | |
php artisan october:up; | |
# Clear out the public directory to replace with a freshly generated one | |
rm -rf public; | |
# Mirror the whitelisted resources to the public directory with relative symlinks for a whitelist approach to security | |
php artisan october:mirror public --relative; | |
# Disable Maintenance Mode | |
php artisan up; |
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 | |
// Get an array of each of the namespace parts | |
$namespace = explode('\\', get_class($this)); | |
// Remove 'Controllers' from the array | |
unset($namespace[2]); | |
// Create the relative url to the controller | |
$controllerBase = strtolower(join('/', $namespace)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment