add token based api auth

This commit is contained in:
TimmensOne
2023-04-03 14:44:33 +02:00
parent ffd98d046e
commit ca9762df9a
2 changed files with 26 additions and 3 deletions

View File

@ -13,7 +13,9 @@ return new class extends Migration
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('tokenable_type');
$table->string('tokenable_id');
$table->index(["tokenable_type", "tokenable_id"]);
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();