Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

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

  • 23656
  • Created Jul 2017
  • Updated Nov 2025

Files in this example

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

koel/koel

  • 16858
  • Created Dec 2015
  • Updated Nov 2025

Files in this example

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

akaunting/akaunting

  • 9348
  • Created Sep 2017
  • Updated Nov 2025

Files in this example

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

pterodactyl/panel

  • 8314
  • Created Dec 2016
  • Updated Nov 2025

Files in this example

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

bytefury/crater

  • 8213
  • 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

  • 3925
  • Created Jun 2018
  • Updated Nov 2025

Files in this example

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

HiEventsDev/Hi.Events

  • 3299
  • Created Oct 2023
  • Updated Nov 2025

Files in this example

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

Bottelet/DaybydayCRM

  • 2311
  • Created Jul 2016
  • Updated Mar 2025

Files in this example

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

HDInnovations/UNIT3D-Community-Edition

  • 2239
  • Created Dec 2017
  • Updated Nov 2025

Files in this example

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

spatie/dashboard.spatie.be

  • 1947
  • Created Jun 2017
  • Updated Jan 2024

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

  • 1797
  • 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

pelican-dev/panel

  • 1722
  • Created Mar 2024
  • Updated Nov 2025

Files in this example

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

nasirkhan/laravel-starter

  • 1355
  • Created Oct 2017
  • Updated Nov 2025

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

Paymenter/Paymenter

  • 1096
  • Created Jul 2024
  • Updated Nov 2025

Files in this example

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

range-of-motion/budget

  • 1057
  • Created Jul 2017
  • Updated Dec 2024

Files in this example

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

4jean/lav_sms

  • 942
  • 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

  • 942
  • 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

  • 739
  • Created May 2022
  • Updated Nov 2025

Files in this example

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

agorakit/agorakit

  • 434
  • Created May 2016
  • Updated Nov 2025

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

  • 216
  • 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

  • 126
  • 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

  • 90
  • 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

  • 70
  • 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

  • 63
  • Created Aug 2018
  • Updated Nov 2025

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 Sep 2025

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

  • 46
  • Created Aug 2024
  • Updated Oct 2025

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

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.