what are helpers in laravel code example
Example 1: laravel helper
use Illuminate\Support\Str;
$length = Str::length('Laravel');
// 7
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;
}