Skip to main content

Code Examples of helpers

Discover how to use Laravel's helpers method in real-world applications. Browse 28 examples from popular open-source projects.

28 examples
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().

monicahq/monica

  • 24763
  • Created Jul 2017
  • Updated Apr 2026

Files in this example

  • app/Helpers/CollectionHelper.php
    • app/Providers/MacroServiceProvider.php
      • app/Http/Controllers/Settings/GendersController.php
View full example

koel/koel

  • 17162
  • Created Dec 2015
  • Updated Jun 2026

Files in this example

  • app/Helpers.php
    • resources/views/index.blade.php
View full example

akaunting/akaunting

  • 9876
  • Created Sep 2017
  • Updated Jun 2026

Files in this example

  • app/Utilities/helpers.php
    • composer.json
      • app/Http/Controllers/Auth/Login.php
View full example

pterodactyl/panel

  • 8951
  • Created Dec 2016
  • Updated Jun 2026

Files in this example

  • app/helpers.php
    • app/Repositories/Eloquent/EggRepository.php
View full example

bytefury/crater

  • 8295
  • Created Nov 2019
  • Updated Aug 2024

Files in this example

  • app/Space/helpers.php
    • resources/views/app/pdf/invoice/partials/table.blade.php
View full example

area17/twill

  • 3957
  • Created Jun 2018
  • Updated Jun 2026

Files in this example

  • src/Helpers/helpers.php
    • src/Http/Controllers/Admin/SettingController.php
View full example

HiEventsDev/Hi.Events

  • 3870
  • Created Oct 2023
  • Updated Jun 2026

Files in this example

  • backend/app/Helper/DateHelper.php
    • backend/app/Services/Handlers/Event/UpdateEventHandler.php
View full example

HDInnovations/UNIT3D-Community-Edition

  • 2391
  • Created Dec 2017
  • Updated Jun 2026

Files in this example

  • app/Helpers/Helpers.php
    • app/Http/Controllers/CommentController.php
View full example

Bottelet/DaybydayCRM

  • 2316
  • Created Jul 2016
  • Updated May 2026

Files in this example

  • app/helpers.php
    • composer.json
      • resources/views/auth/login.blade.php
        • app/Http/Middleware/RedirectIfDemo.php
View full example

pelican-dev/panel

  • 2111
  • Created Mar 2024
  • Updated Jun 2026

Files in this example

  • app/helpers.php
    • composer.json
      • app/Filament/Admin/Resources/NodeResource/Widgets/NodeStorageChart.php
View full example

spatie/dashboard.spatie.be

  • 1956
  • Created Jun 2017
  • Updated Jun 2026

Files in this example

  • app/helpers.php
    • resources/views/components/tiles/statistics.blade.php
      • resources/views/dashboard.blade.php
        • composer.json
View full example

guillaumebriday/laravel-blog

  • 1800
  • Created Dec 2016
  • Updated Oct 2024

Files in this example

  • app/Helpers/date.php
    • app/Models/User.php
      • tests/Unit/PostTest.php
        • composer.json
View full example

Paymenter/Paymenter

  • 1762
  • Created Jul 2024
  • Updated Jun 2026

Files in this example

  • app/Helpers/ExtensionHelper.php
    • app/Jobs/Servers/TerminateServer.php
View full example

nasirkhan/laravel-starter

  • 1388
  • Created Oct 2017
  • Updated May 2026

Files in this example

  • app/helpers.php
    • composer.json
      • Modules/Tag/Resources/views/backend/tags/form.blade.php
        • app/Http/Controllers/Backend/RolesController.php
View full example

range-of-motion/budget

  • 1063
  • Created Jul 2017
  • Updated Dec 2024

Files in this example

  • app/Helper.php
    • app/Models/Budget.php
View full example

4jean/lav_sms

  • 990
  • Created Oct 2019
  • Updated Mar 2024

Files in this example

  • app/Helpers/Qs.php
    • app/Http/Controllers/SupportTeam/UserController.php
View full example

officelifehq/officelife

  • 949
  • Created Jan 2019
  • Updated Jul 2024

Files in this example

  • app/Helpers/BirthdayHelper.php
    • app/Http/ViewHelpers/Team/TeamShowViewHelper.php
View full example

beromir/Servas

  • 814
  • Created May 2022
  • Updated Apr 2026

Files in this example

  • app/Helpers/WebpageData.php
    • app/Http/Controllers/ApiControllers/LinkController.php
View full example

agorakit/agorakit

  • 450
  • Created May 2016
  • Updated Feb 2026

Files in this example

  • app/Helpers/Functions.php
    • resources/views/files/create.blade.php
      • app/Console/Commands/DeleteFiles.php
        • composer.json
View full example

LaraBug/larabug-app

  • 218
  • Created Apr 2021
  • Updated Oct 2023

Files in this example

  • app/Utilities/helpers.php
    • resources/views/frontend/partials/meta.blade.php
      • composer.json
View full example

jcergolj/laravellte

  • 215
  • Created Jan 2020
  • Updated Feb 2023

Files in this example

  • app/helpers.php
    • composer.json
      • app/Http/Controllers/ConfirmedEmailController.php
View full example

phpreel/phpreel

  • 127
  • Created May 2021
  • Updated Nov 2022

Files in this example

  • app/Helpers/Categories/CategoriesHandler.php
    • app/Http/Controllers/CategoriesController.php
View full example

familytree365/backend

  • 89
  • Created May 2021
  • Updated Aug 2021

Files in this example

  • app/Helpers/helpers.php
    • app/Http/Controllers/DnaController.php
      • composer.json
View full example

hbakouane/admin-user-chatting

  • 71
  • Created Nov 2020
  • Updated Nov 2021

Files in this example

  • app/helpers.php
    • resources/views/livewire/show.blade.php
      • composer.json
View full example

Wotuu/keystone.guru

  • 64
  • Created Aug 2018
  • Updated Jun 2026

Files in this example

  • app/Helpers/CustomHelper.php
    • resources/views/common/general/alert.blade.php
      • app/Providers/HelperServiceProvider.php
        • config/app.php
View full example

spatie/laravel-beyond-crud.com

  • 58
  • Created Jun 2020
  • Updated Jan 2026

Files in this example

  • app/helpers.php
    • resources/views/partials/footer.blade.php
      • resources/views/front/home/sample-chapter.blade.php
View full example

clockobot/clockobot

  • 49
  • Created Aug 2024
  • Updated Jun 2026

Files in this example

  • app/Helpers.php
    • composer.json
      • app/Livewire/Reporting/ReportingIndex.php
        • tests/Feature/HelpersTest.php
View full example

Ayenko4all/school-management-system-backend

  • 12
  • Created Aug 2021
  • Updated Nov 2021

Files in this example

  • app/helpers.php
    • app/Http/Controllers/Auth/RegistrationController.php
View full example