Skip to content

Instantly share code, notes, and snippets.

@jonathandey
Forked from LukeTowers/.gitignore
Last active May 5, 2020 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathandey/9c0fe9ac4b46dd25ac48b6b1f740ebf4 to your computer and use it in GitHub Desktop.
Save jonathandey/9c0fe9ac4b46dd25ac48b6b1f740ebf4 to your computer and use it in GitHub Desktop.
OctoberCMS Tricks
/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
/plugins/*/*/vendor
/node_modules
/plugins/bedard/debugbar
# 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
# 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;
<?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