Changeset View
Changeset View
Standalone View
Standalone View
src/app/Policy/RateLimit.php
<?php | <?php | ||||
namespace App\Policy; | namespace App\Policy; | ||||
use App\Traits\BelongsToUserTrait; | |||||
use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||
class RateLimit extends Model | class RateLimit extends Model | ||||
{ | { | ||||
use BelongsToUserTrait; | |||||
protected $fillable = [ | protected $fillable = [ | ||||
'user_id', | 'user_id', | ||||
'owner_id', | 'owner_id', | ||||
'recipient_hash', | 'recipient_hash', | ||||
'recipient_count' | 'recipient_count' | ||||
]; | ]; | ||||
protected $table = 'policy_ratelimit'; | protected $table = 'policy_ratelimit'; | ||||
public function owner() | public function owner() | ||||
{ | { | ||||
$this->belongsTo('App\User'); | $this->belongsTo(\App\User::class); | ||||
} | |||||
public function user() | |||||
{ | |||||
$this->belongsTo('App\User'); | |||||
} | } | ||||
} | } |