how to implement helper function globally in laravel code example
Example 1: how to share a helper globally laravel
require_once app_path('Helpers/AnythingHelper.php');
Example 2: how to share a helper globally laravel
<?php
function getDomesticCities()
{
$result = \App\Package::where('type', '=', 'domestic')
->groupBy('from_city')
->get(['from_city']);
return $result;
}