Created
January 23, 2015 07:29
Revisions
-
setkyar created this gist
Jan 23, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ //Create New Folder Call MyClass on `app/` directory Add new line on `/app/start/global.php` ClassLoader::addDirectories(array( app_path().'/commands', app_path().'/controllers', app_path().'/models', app_path().'/database/seeds', app_path().'/MyClass', // This line is the one we need to add )); Create a file in `app/MyClass/Helper.php` and add such as like <?php namespace Helpers; class Helper { public static function helloWorld() { return 'Hello World'; } } All you would need to do is call `Helpers\Helper::helloWorld();` You could also **alias** this helper class in your `/app/config/app.php` file. Just add something like this to the end of the aliases array: 'Helper' => 'Helpers\Helper'