adding counter on menu

This commit is contained in:
Geriano
2022-08-29 14:27:07 +07:00
parent 8a8bc4361d
commit b35b61dc14
9 changed files with 296 additions and 19 deletions

View File

@@ -0,0 +1,36 @@
<?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::table('menus', function (Blueprint $table) {
$table->after('route_or_url', function (Blueprint $table) {
$table->string('counter_handler', 512)
->nullable()
->default(null);
});
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('menus', function (Blueprint $table) {
$table->dropColumn('counter_handler');
});
}
};