Skip to content

Instantly share code, notes, and snippets.

@tomsseisums
Created April 28, 2014 06:56
Show Gist options
  • Save tomsseisums/11363680 to your computer and use it in GitHub Desktop.
Save tomsseisums/11363680 to your computer and use it in GitHub Desktop.
Laravel separator (app/start)
<?php
/** @append */
/*
|--------------------------------------------------------------------------
| Require project specific logic separation files
|--------------------------------------------------------------------------
|
| Next we will load files that help us to separate some logic, therefore
| keep the application as readable and consistent as possible.
|
*/
// Global helpers.
if (file_exists($helpers = app_path() . '/helpers.php'))
{
require $helpers;
}
// View composers.
if (file_exists($composers = app_path() . '/composers.php'))
{
require $composers;
}
// Macros.
if (file_exists($macros = app_path() . '/macros.php'))
{
require $macros;
}
// Event listeners.
if (file_exists($events = app_path() . '/events.php'))
{
require $events;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment