laravel helpers.php 7 code example
Example 1: how to share a helper globally laravel
php artisan make:provider HelperServiceProvider
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;
}