From a0aed6757d3051e63a090d983bf1f2a1bd255305 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 1 Jan 2015 13:40:02 +0000 Subject: [PATCH] CI fixes --- app/controllers/DashAPIController.php | 7 ++++++- ...5_01_01_122720_AlterTableComponentsAddOrderColumn.php | 9 ++++----- app/models/Component.php | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/controllers/DashAPIController.php b/app/controllers/DashAPIController.php index d1f315dd..39d5b1cb 100644 --- a/app/controllers/DashAPIController.php +++ b/app/controllers/DashAPIController.php @@ -20,6 +20,11 @@ class DashAPIController extends Controller } } + /** + * Updates a components ordering. + * + * @return array + */ public function postUpdateComponentOrder() { $componentData = Input::all(); @@ -28,7 +33,7 @@ class DashAPIController extends Controller foreach ($componentData['component'] as $componentId => $order) { $component = Component::find($componentId); $component->update([ - 'order' => $order + 'order' => $order, ]); } diff --git a/app/database/migrations/2015_01_01_122720_AlterTableComponentsAddOrderColumn.php b/app/database/migrations/2015_01_01_122720_AlterTableComponentsAddOrderColumn.php index 437c76c4..358241d5 100644 --- a/app/database/migrations/2015_01_01_122720_AlterTableComponentsAddOrderColumn.php +++ b/app/database/migrations/2015_01_01_122720_AlterTableComponentsAddOrderColumn.php @@ -3,7 +3,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class AlterTableComponentsAddOrderColumn extends Migration { +class AlterTableComponentsAddOrderColumn extends Migration +{ /** * Run the migrations. @@ -12,8 +13,7 @@ class AlterTableComponentsAddOrderColumn extends Migration { */ public function up() { - Schema::table('components', function(Blueprint $table) - { + Schema::table('components', function(Blueprint $table) { $table->tinyInteger('order')->default(0)->after('status'); }); } @@ -25,8 +25,7 @@ class AlterTableComponentsAddOrderColumn extends Migration { */ public function down() { - Schema::table('components', function(Blueprint $table) - { + Schema::table('components', function(Blueprint $table) { $table->dropColumn('order'); }); } diff --git a/app/models/Component.php b/app/models/Component.php index 572b8296..c63974fe 100644 --- a/app/models/Component.php +++ b/app/models/Component.php @@ -21,7 +21,7 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable 'user_id', 'tags', 'link', - 'order' + 'order', ]; /**