Examples of Global helpers (21)

Short information about global helpers

Helper files are usually used as global functions that don't belong to any particular class, and may be used anywhere in the Laravel project: in Controllers, Blade Views, or other classes.
To include such a helper file globally, typically it's added to the composer.json section "autoload" -> "files".
Important: if you describe some function as global, you should check if the same function name doesn't exist elsewhere in the project, with method function_exists().

Repository: monicahq/monica (Github)
★ 13109 Created: Jul 2017 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Helpers/CollectionHelper.php
- app/Providers/MacroServiceProvider.php
- app/Http/Controllers/Settings/GendersController.php
Repository: koel/koel (Github)
★ 12683 Created: Dec 2015 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Helpers.php
- resources/views/index.blade.php
Repository: akaunting/akaunting (Github)
★ 4174 Created: Sep 2017 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Utilities/helpers.php
- composer.json
- app/Http/Controllers/Auth/Login.php
Repository: bytefury/crater (Github)
★ 4133 Created: Nov 2019 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Space/helpers.php
- resources/views/app/pdf/invoice/partials/table.blade.php
Repository: pterodactyl/panel (Github)
★ 2612 Created: Dec 2016 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- app/Repositories/Eloquent/EggRepository.php
Repository: area17/twill (Github)
★ 2381 Created: Jun 2018 Updated: Aug 2021 Laravel version: 8
Files in the example:
- src/Helpers/helpers.php
- src/Http/Controllers/Admin/SettingController.php
Repository: spatie/dashboard.spatie.be (Github)
★ 1906 Created: Jun 2017 Updated: Apr 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/components/tiles/statistics.blade.php
- resources/views/dashboard.blade.php
- composer.json
Repository: Bottelet/DaybydayCRM (Github)
★ 1748 Created: Jul 2016 Updated: Jun 2021 Laravel version: 7
Files in the example:
- app/helpers.php
- composer.json
- resources/views/auth/login.blade.php
- app/Http/Middleware/RedirectIfDemo.php
Repository: HDInnovations/UNIT3D-Community-Edition (Github)
★ 1366 Created: Dec 2017 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Helpers/Helpers.php
- app/Http/Controllers/CommentController.php
Repository: guillaumebriday/laravel-blog (Github)
★ 1317 Created: Dec 2016 Updated: May 2021 Laravel version: 8
Files in the example:
- app/Helpers/date.php
- app/Models/User.php
- tests/Unit/PostTest.php
- composer.json
Repository: nasirkhan/laravel-starter (Github)
★ 364 Created: Oct 2017 Updated: Jun 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- composer.json
- Modules/Tag/Resources/views/backend/tags/form.blade.php
- app/Http/Controllers/Backend/RolesController.php
Repository: agorakit/agorakit (Github)
★ 332 Created: May 2016 Updated: Jun 2021 Laravel version: 8
Files in the example:
- app/Helpers/Functions.php
- resources/views/files/create.blade.php
- app/Console/Commands/DeleteFiles.php
- composer.json
Repository: officelifehq/officelife (Github)
★ 217 Created: Jan 2019 Updated: Aug 2021 Laravel version: 8
Files in the example:
- app/Helpers/BirthdayHelper.php
- app/Http/ViewHelpers/Team/TeamShowViewHelper.php
Repository: LaraBug/larabug-app (Github)
★ 125 Created: Apr 2021 Updated: Jun 2021 Laravel version: 8
Files in the example:
- app/Utilities/helpers.php
- resources/views/frontend/partials/meta.blade.php
- composer.json
Repository: jcergolj/laravellte (Github)
★ 122 Created: Jan 2020 Updated: Jun 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- composer.json
- app/Http/Controllers/ConfirmedEmailController.php
Repository: 4jean/lav_sms (Github)
★ 114 Created: Oct 2019 Updated: May 2021 Laravel version: 8
Files in the example:
- app/Helpers/Qs.php
- app/Http/Controllers/SupportTeam/UserController.php
Repository: familytree365/backend (Github)
★ 64 Created: May 2021 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Helpers/helpers.php
- app/Http/Controllers/DnaController.php
- composer.json
Repository: phpreel/phpreel (Github)
★ 60 Created: May 2021 Updated: Aug 2021 Laravel version: 8
Files in the example:
- app/Helpers/Categories/CategoriesHandler.php
- app/Http/Controllers/CategoriesController.php
Repository: Wotuu/keystone.guru (Github)
★ 33 Created: Aug 2018 Updated: Jul 2021 Laravel version: 8
Files in the example:
- app/Helpers/CustomHelper.php
- resources/views/common/general/alert.blade.php
- app/Providers/HelperServiceProvider.php
- config/app.php
Repository: spatie/laravel-beyond-crud.com (Github)
★ 33 Created: Jun 2020 Updated: Aug 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/partials/footer.blade.php
- resources/views/front/home/sample-chapter.blade.php
Repository: hbakouane/admin-user-chatting (Github)
★ 22 Created: Nov 2020 Updated: Apr 2021 Laravel version: 8
Files in the example:
- app/helpers.php
- resources/views/livewire/show.blade.php
- composer.json

Additional resources on global helpers: