laravel create your own helpers code example
Example 1: add custom helper laravel
composer dump-autoload
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;
}