Skip to main content

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

Read more here

caneara/lumeno

14 stars
2 code files
View caneara/lumeno on GitHub

app/Models/User.php

Open in GitHub
use App\Types\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\MustVerifyEmail as MustVerifyEmailContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
 
class User extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract, MustVerifyEmailContract
{
//
public const COMMUTE_KILOMETERS_ZERO = 0;
public const COMMUTE_KILOMETERS_5 = 5;
public const COMMUTE_KILOMETERS_10 = 10;
public const COMMUTE_KILOMETERS_15 = 15;
public const COMMUTE_KILOMETERS_20 = 20;
public const COMMUTE_KILOMETERS_25 = 25;
public const COMMUTE_KILOMETERS_30 = 30;
public const COMMUTE_KILOMETERS_40 = 40;
public const COMMUTE_KILOMETERS_50 = 50;
public const COMMUTE_KILOMETERS_75 = 75;
public const COMMUTE_KILOMETERS_100 = 100;
//
}

app/Collections/CommuteDistanceCollection.php

Open in GitHub
use App\Models\User;
use App\Types\Collection;
 
class CommuteDistanceCollection extends Collection
{
protected function source() : array
{
return [
(object) ['id' => User::COMMUTE_KILOMETERS_ZERO, 'hidden' => true, 'name' => 'None (Remote Working)'],
(object) ['id' => User::COMMUTE_KILOMETERS_5, 'hidden' => false, 'name' => '5 kilometers / 3 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_10, 'hidden' => false, 'name' => '10 kilometers / 6 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_15, 'hidden' => false, 'name' => '15 kilometers / 9 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_20, 'hidden' => false, 'name' => '20 kilometers / 12 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_25, 'hidden' => false, 'name' => '25 kilometers / 15 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_30, 'hidden' => false, 'name' => '30 kilometers / 18 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_40, 'hidden' => false, 'name' => '40 kilometers / 24 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_50, 'hidden' => false, 'name' => '50 kilometers / 30 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_75, 'hidden' => false, 'name' => '75 kilometers / 46 miles'],
(object) ['id' => User::COMMUTE_KILOMETERS_100, 'hidden' => false, 'name' => '100 kilometers / 62 miles'],
];
}
}

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.