first commit

This commit is contained in:
Doar Mihai
2026-08-08 18:03:29 +03:00
commit df2128ebff
183 changed files with 18719 additions and 0 deletions
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tools', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->text('description');
$table->string('url');
$table->string('logo_url')->nullable();
$table->string('category');
$table->string('subcategory')->nullable();
$table->json('tags')->nullable();
$table->string('pricing')->nullable();
$table->json('features')->nullable();
$table->unsignedInteger('views')->default(0);
$table->unsignedInteger('clicks')->default(0);
$table->boolean('featured')->default(false);
$table->boolean('approved')->default(false);
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->timestamps();
$table->index(['category', 'subcategory']);
$table->index(['approved', 'featured']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tools');
}
};