diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php new file mode 100644 index 0000000..9919619 --- /dev/null +++ b/app/Http/Controllers/PublicController.php @@ -0,0 +1,14 @@ +firstOrFail(); + return view('public.view', ['home' => $home]); + } +} diff --git a/database/migrations/2020_07_24_102725_update_homes_with_public_uuid.php b/database/migrations/2020_07_24_102725_update_homes_with_public_uuid.php new file mode 100644 index 0000000..3dfdfc9 --- /dev/null +++ b/database/migrations/2020_07_24_102725_update_homes_with_public_uuid.php @@ -0,0 +1,32 @@ +string('slug')->nullable()->comment('Uuid for public link'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('homes', static function (Blueprint $table) { + $table->dropColumn('slug'); + }); + } +} diff --git a/resources/views/homes/add.blade.php b/resources/views/homes/add.blade.php index 73ea5b0..3d1fa80 100644 --- a/resources/views/homes/add.blade.php +++ b/resources/views/homes/add.blade.php @@ -96,6 +96,16 @@ +