%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/graphicd/public_html/vebto/common/Plays/
Upload File :
Create Path :
Current File : /home/graphicd/public_html/vebto/common/Plays/FindsCurrentUserPlays.php

<?php

namespace Common\Plays;

use Auth;
use Illuminate\Database\Eloquent\Builder;

trait FindsCurrentUserPlays
{
    public function scopeForCurrentUser(Builder $builder): Builder
    {
        if (Auth::check()) {
            return $builder->where('user_id', Auth::id());
        } else {
            return $builder->where('ip', getIp());
        }
    }
}

Zerion Mini Shell 1.0