From 927e68223bd5bf600073d106e2360761af03702e Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Sun, 14 Jun 2020 12:44:16 +0200 Subject: [PATCH] Changing Tags --- .../Controllers/Shop/Admin/TagController.php | 60 ----------------- config/tagging.php | 31 --------- .../2014_10_12_000000_create_users_table.php | 36 ---------- ...12_100000_create_password_resets_table.php | 32 --------- ..._08_19_000000_create_failed_jobs_table.php | 35 ---------- ...019_10_26_124858_laratrust_setup_teams.php | 67 ------------------- 6 files changed, 261 deletions(-) delete mode 100644 app/Http/Controllers/Shop/Admin/TagController.php delete mode 100644 config/tagging.php delete mode 100644 database/migrations/2014_10_12_000000_create_users_table.php delete mode 100644 database/migrations/2014_10_12_100000_create_password_resets_table.php delete mode 100644 database/migrations/2019_08_19_000000_create_failed_jobs_table.php delete mode 100644 database/migrations/2019_10_26_124858_laratrust_setup_teams.php diff --git a/app/Http/Controllers/Shop/Admin/TagController.php b/app/Http/Controllers/Shop/Admin/TagController.php deleted file mode 100644 index 48ed77b1..00000000 --- a/app/Http/Controllers/Shop/Admin/TagController.php +++ /dev/null @@ -1,60 +0,0 @@ -render('Shop.Admin.Tags.list'); - } - - public function getDatatable(Request $request) - { - return Tags::getTables($request->all()); - } - - public function create() - { - $data = []; - $data['groups'] = TagGroups::getOptions(); - return view('Shop.Admin.Tags.create', $data); - } - - public function store(Request $request) - { - $ret = Tags::store($request->all()); - return redirect()->route('Shop.Admin.Tags.index'); - } - - public function show($id) - { - $data = Tags::get($id); - return view('Shop.Admin.Tags.view', $data); - } - - public function edit($id) - { - $data = Tags::get($id); - $data['groups'] = TagGroups::getOptions(); - return view('Shop.Admin.Tags.edit', $data); - } - - public function update(Request $request) - { - // - } - - public function destroy($id) - { - return Tags::destroy($id); - } - -} diff --git a/config/tagging.php b/config/tagging.php deleted file mode 100644 index 216442fc..00000000 --- a/config/tagging.php +++ /dev/null @@ -1,31 +0,0 @@ - 'integer', // 'string' or 'integer' - - // Value of are passed through this before save of tags - 'normalizer' => '\Conner\Tagging\TaggingUtility::slug', - - // Display value of tags are passed through (for front end display) - 'displayer' => '\Illuminate\Support\Str::title', - - // Database connection for Conner\Taggable\Tag model to use -// 'connection' => 'mysql', - - // When deleting a model, remove all the tags first - 'untag_on_delete' => true, - - // Auto-delete unused tags from the 'tags' database table (when they are used zero times) - 'delete_unused_tags' => false, - - // Model to use to store the tags in the database - 'tag_model'=>'\Conner\Tagging\Model\Tag', - - // Delimiter used within tags - 'delimiter' => '-', - - // Model to use for the relation between tags and tagged records - 'tagged_model' => '\Conner\Tagging\Model\Tagged', -]; diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index a91e1d3c..00000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,36 +0,0 @@ -bigIncrements('id'); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('users'); - } -} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index 0ee0a36a..00000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('password_resets'); - } -} diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index 389bdf76..00000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,35 +0,0 @@ -bigIncrements('id'); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('failed_jobs'); - } -} diff --git a/database/migrations/2019_10_26_124858_laratrust_setup_teams.php b/database/migrations/2019_10_26_124858_laratrust_setup_teams.php deleted file mode 100644 index 2551d62b..00000000 --- a/database/migrations/2019_10_26_124858_laratrust_setup_teams.php +++ /dev/null @@ -1,67 +0,0 @@ -increments('id'); - $table->string('name')->unique(); - $table->string('display_name')->nullable(); - $table->string('description')->nullable(); - $table->timestamps(); - }); - - Schema::table('role_user', function (Blueprint $table) { - // Drop role foreign key and primary key - $table->dropForeign(['role_id']); - $table->dropPrimary(['user_id', 'role_id', 'user_type']); - - // Add team_id column - $table->unsignedInteger('team_id')->nullable(); - - // Create foreign keys - $table->foreign('role_id')->references('id')->on('roles') - ->onUpdate('cascade')->onDelete('cascade'); - $table->foreign('team_id')->references('id')->on('teams') - ->onUpdate('cascade')->onDelete('cascade'); - - // Create a unique key - $table->unique(['user_id', 'role_id', 'user_type', 'team_id']); - }); - - Schema::table('permission_user', function (Blueprint $table) { - // Drop permission foreign key and primary key - $table->dropForeign(['permission_id']); - $table->dropPrimary(['permission_id', 'user_id', 'user_type']); - - $table->foreign('permission_id')->references('id')->on('permissions') - ->onUpdate('cascade')->onDelete('cascade'); - - // Add team_id column - $table->unsignedInteger('team_id')->nullable(); - - $table->foreign('team_id')->references('id')->on('teams') - ->onUpdate('cascade')->onDelete('cascade'); - - $table->unique(['user_id', 'permission_id', 'user_type', 'team_id']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - } -}