Last active
February 3, 2025 19:47
-
-
Save mabasic/21d13eab12462e596120 to your computer and use it in GitHub Desktop.
Revisions
-
Mario Bašić revised this gist
Sep 25, 2016 . 1 changed file with 4 additions and 2 deletions.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 @@ -2,11 +2,13 @@ Create a file called `helpers.php` in the `app/` directory. Paste the code inside it. Go to `composer.json` and add `files` to `autoload` so that it looks like this: ```json "autoload": { "psr-4": { "App\\": "app/" }, "files": [ "app/helpers.php" ] -
Mario Bašić revised this gist
Sep 25, 2016 . 1 changed file with 16 additions and 0 deletions.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,16 @@ # Instructions Create a file called `helpers.php` in the `app/` directory. Paste the code inside it. Go to `composer.json` and add to `autoload`: ```json "autoload": { ... "files": [ "app/helpers.php" ] }, ``` Run `composer dump-autoload` to load the newly created helpers file. -
Mario Bašić created this gist
Jun 22, 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,15 @@ <?php if ( ! function_exists('config_path')) { /** * Get the configuration path. * * @param string $path * @return string */ function config_path($path = '') { return app()->basePath() . '/config' . ($path ? '/' . $path : $path); } }