/** * Create the database tables necessary for layout modes * * @return void */ private function buildTables() { if (!Schema::hasTable($this->model->getTable('routes'))) { Schema::create($this->model->getTable('routes'), function ($table) { $table->increments('id'); $table->string('path'); $table->enum('type', array('get', 'post')); $table->string('controller'); $table->string('action'); $table->string('prefix')->nullable(); $table->string('filters')->nullable(); $table->tinyInteger('require_https')->default(0); $table->integer('salience')->default(100); $table->timestamps(); }); } if (!Schema::hasTable($this->model->getTable('pages'))) { Schema::create($this->model->getTable('pages'), function ($table) { $table->increments('id'); $table->string('name'); $table->integer('route'); $table->integer('desktop_layout_id'); $table->integer('mobile_layout_id'); $table->string('user_privilege')->nullable(); $table->string('meta_title'); $table->text('meta_description'); $table->tinyInteger('noindex')->default(0); $table->tinyInteger('require_https')->default(0); $table->tinyInteger('tracking')->default(1); $table->text('tracking_custom_vars'); $table->timestamps(); }); } if (!Schema::hasTable($this->model->getTable('templates'))) { Schema::create($this->model->getTable('templates'), function ($table) { $table->increments('id'); $table->string('name'); $table->tinyInteger('active')->default(1); $table->text('json_slots'); $table->timestamps(); }); } if (!Schema::hasTable($this->model->getTable('desktop_layouts'))) { Schema::create($this->model->getTable('desktop_layouts'), function ($table) { $table->increments('id'); $table->tinyInteger('template'); $table->text('json_views'); $table->text('notes'); $table->timestamps(); }); } if (!Schema::hasTable($this->model->getTable('mobile_layouts'))) { Schema::create($this->model->getTable('mobile_layouts'), function ($table) { $table->increments('id'); $table->tinyInteger('template'); $table->text('json_views'); $table->text('notes'); $table->timestamps(); }); } }