Skip to main content

OpenLitterMap/openlittermap-web

123 stars
1 code files
View OpenLitterMap/openlittermap-web on GitHub

app/Models/User/User.php

Open in GitHub
use Illuminate\Foundation\Auth\User as Authenticatable;
 
class User extends Authenticatable
{
//
public static function boot ()
{
//
static::addGlobalScope('photosCount', function($builder) {
$builder->withCount('photos'); // photos_count
});
}
//
}

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.