добавлен авторищация по api, экспорт и импорт продуктов

This commit is contained in:
abdurahman
2024-01-08 17:13:13 +05:00
parent c08b36d1b6
commit af1e381ca0
14 changed files with 906 additions and 434 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('api_tokens', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->nullable()->unsigned();
$table->string('token');
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('api_tokens');
}
};