<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAccessRoutesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('access_routes', function (Blueprint $table) {
            $table->id();
            
            $table->string('name_route')->nullable();
            $table->string('name_table')->nullable();
            $table->string('name_model_ar')->nullable();
            $table->string('name_model_en')->nullable();
            $table->string('icon_model')->nullable();
            $table->boolean('show_count')->default(0);
            $table->integer('parent_id')->nullable();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('access_routes');
    }
}
