From ee4b7ba8b242fe6b01a12cd0192199c5d987bb3d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 9 Feb 2019 22:41:18 -0700 Subject: [PATCH] Add CircleProfile controller, model and migration --- app/CircleProfile.php | 13 +++++++ .../Controllers/CircleProfileController.php | 10 ++++++ ...09_045956_create_circle_profiles_table.php | 35 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 app/CircleProfile.php create mode 100644 app/Http/Controllers/CircleProfileController.php create mode 100644 database/migrations/2019_02_09_045956_create_circle_profiles_table.php diff --git a/app/CircleProfile.php b/app/CircleProfile.php new file mode 100644 index 000000000..bc99d08a4 --- /dev/null +++ b/app/CircleProfile.php @@ -0,0 +1,13 @@ +bigIncrements('id'); + $table->bigInteger('owner_id')->unsigned()->nullable()->index(); + $table->bigInteger('circle_id')->unsigned()->index(); + $table->bigInteger('profile_id')->unsigned()->index(); + $table->unique(['circle_id', 'profile_id']); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('circle_profiles'); + } +}