API key management interface

This commit is contained in:
2021-03-30 01:27:49 +01:00
parent 6d94263ede
commit 99779c9053
11 changed files with 406 additions and 3 deletions

25
app/ApiKey.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ApiKey extends Model
{
use HasFactory;
protected $fillable = [
'name',
'status',
'discriminator',
'last_used',
'secret',
'owner_user_id'
];
public function user()
{
return $this->belongsTo('App\User', 'id');
}
}