feat: add sub category deep link
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
<?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('sub_categories', function (Blueprint $table) {
|
||||
// When true the subcategory is hidden from list/search but still
|
||||
// reachable through its deep link (https://aramejan.com/subcategory/{id}).
|
||||
$table->boolean('is_deeplink_only')->default(false)->after('description');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sub_categories', function (Blueprint $table) {
|
||||
$table->dropColumn('is_deeplink_only');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user