File manager - Edit - /home/linknsbh/sabel-eltaqwa.com/assets/lfm/files/shares/events/thumbs/database.zip
Back
PK ���\�ow� � factories/UserFactory.phpnu �[��� <?php namespace Database\Factories; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class UserFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = User::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), ]; } /** * Indicate that the model's email address should be unverified. * * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function unverified() { return $this->state(function (array $attributes) { return [ 'email_verified_at' => null, ]; }); } } PK ���\���� � @ migrations/2026_01_09_102026_create_ai_generation_logs_table.phpnu �[��� <?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('ai_generation_logs', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('package_id')->nullable(); $table->string('ai_engine'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('ai_generation_logs'); } }; PK ���\�)��� � seeds/DatabaseSeeder.phpnu �[��� <?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { // $this->call(UsersTableSeeder::class); } } PK ���\�.�W .gitignorenu �[��� *.sqlite* PK Ӓ�\��[�~ ~ F migrations/2025_05_09_104218_add_partial_amount_to_purchases_table.phpnu �[��� <?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::table('purchases', function (Blueprint $table) { $table->double('partial_amount')->nullable()->after('paid_amount'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('purchases', function (Blueprint $table) { $table->dropColumn('partial_amount'); }); } }; PK Ӓ�\%#� 9 migrations/2022_02_21_073634_create_permission_tables.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use Spatie\Permission\PermissionRegistrar; return new class extends Migration { /** * Run the migrations. */ public function up(): void { $tableNames = config('permission.table_names'); $columnNames = config('permission.column_names'); $teams = config('permission.teams'); if (empty($tableNames)) { throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.'); } if ($teams && empty($columnNames['team_foreign_key'] ?? null)) { throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.'); } Schema::create($tableNames['permissions'], function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); // For MySQL 8.0 use string('name', 125); $table->string('guard_name')->default('web'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); // $table->unique(['name', 'guard_name']); }); Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) { $table->bigIncrements('id'); if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); } $table->string('name'); // For MySQL 8.0 use string('name', 125); $table->string('guard_name')->default('web'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); if ($teams || config('permission.testing')) { // $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); } else { // $table->unique(['name', 'guard_name']); } }); Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); if ($teams) { $table->unsignedBigInteger($columnNames['team_foreign_key']); $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); $table->primary([ $columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_permission_model_type_primary'); } else { $table->primary([ PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_permission_model_type_primary'); } }); Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); if ($teams) { $table->unsignedBigInteger($columnNames['team_foreign_key']); $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); $table->primary([ $columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type', ], 'model_has_roles_role_model_type_primary'); } else { $table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], 'model_has_roles_role_model_type_primary'); } }); Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); $table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary'); }); app('cache') ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) ->forget(config('permission.cache.key')); } /** * Reverse the migrations. */ public function down(): void { $tableNames = config('permission.table_names'); if (empty($tableNames)) { throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); } Schema::drop($tableNames['role_has_permissions']); Schema::drop($tableNames['model_has_roles']); Schema::drop($tableNames['model_has_permissions']); Schema::drop($tableNames['roles']); Schema::drop($tableNames['permissions']); } }; PK Ӓ�\�Zl� 5 migrations/2023_12_22_065227_fill_up_product_code.phpnu �[��� <?php use App\Models\Product; use Illuminate\Database\Migrations\Migration; return new class extends Migration { /** * Run the migrations. */ public function up(): void { $products = Product::where('product_code','')->get(); foreach ($products as $product) { $product->update([ 'product_code' => $product->code ]); } } /** * Reverse the migrations. */ public function down(): void { // } }; PK Ӓ�\2��\ E migrations/2025_05_01_110910_create_stores_and_user_stores_tables.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Artisan::call('db:seed', [ '--class' => 'StoreSeeder', '--force' => true, ]); } /** * Reverse the migrations. */ public function down(): void { // } }; PK Ӓ�\��`�H H C migrations/2022_10_17_052105_add_is_return_field_to_sales_table.phpnu �[��� <?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::table('sales', function (Blueprint $table) { $table->boolean('is_return')->default(0)->after('date'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { // }); } }; PK Ӓ�\*�=�L L . migrations/2022_02_18_051026_create_brands.phpnu �[��� <?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('brands', function (Blueprint $table) { $table->id(); $table->string('tenant_id')->nullable(); $table->string('name'); $table->longText('description')->nullable(); $table->timestamps(); $table->foreign('tenant_id') ->references('id')->on('tenants') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('brands'); } }; PK Ӓ�\l�I 3 migrations/2022_02_18_063507_create_media_table.phpnu �[��� <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up(): void { Schema::create('media', function (Blueprint $table) { $table->bigIncrements('id'); $table->morphs('model'); $table->uuid('uuid')->nullable()->unique(); $table->string('collection_name'); $table->string('name'); $table->string('file_name'); $table->string('mime_type')->nullable(); $table->string('disk'); $table->string('conversions_disk')->nullable(); $table->unsignedBigInteger('size'); $table->json('manipulations'); $table->json('custom_properties'); $table->json('generated_conversions'); $table->json('responsive_images'); $table->unsignedInteger('order_column')->nullable()->index(); $table->nullableTimestamps(); }); } }; PK Ӓ�\%cCxx x 7 migrations/2022_09_27_103942_add_new_field_in_sales.phpnu �[��� <?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::table('sales', function (Blueprint $table) { $table->boolean('is_sale_created')->default(false)->after('status'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('sales', function (Blueprint $table) { $table->dropColumn('is_sale_created'); }); } }; PK Ӓ�\��{W W <