From 7907c1eecc37e5378da0e28838203c70c693ec71 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 6 Nov 2020 19:59:52 +0100 Subject: Gallery work... --- app/Http/Controllers/GalleryController.php | 2 +- app/Models/Image.php | 11 ++++++++ .../2020_11_06_185340_create_images_table.php | 33 ++++++++++++++++++++++ resources/views/inc/navbar.blade.php | 6 ++-- resources/views/inc/special_navbar.blade.php | 4 +-- resources/views/pages/gallery-add.blade.php | 13 +++++++++ routes/web.php | 3 ++ 7 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 app/Models/Image.php create mode 100644 database/migrations/2020_11_06_185340_create_images_table.php create mode 100644 resources/views/pages/gallery-add.blade.php diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php index efbb55f..8f42b48 100644 --- a/app/Http/Controllers/GalleryController.php +++ b/app/Http/Controllers/GalleryController.php @@ -23,7 +23,7 @@ class GalleryController extends Controller */ public function create() { - // + return view('pages.gallery-add'); } /** diff --git a/app/Models/Image.php b/app/Models/Image.php new file mode 100644 index 0000000..643259e --- /dev/null +++ b/app/Models/Image.php @@ -0,0 +1,11 @@ +id(); + $table->string('name'); + $table->string('path'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('images'); + } +} diff --git a/resources/views/inc/navbar.blade.php b/resources/views/inc/navbar.blade.php index 60bda7b..332c799 100644 --- a/resources/views/inc/navbar.blade.php +++ b/resources/views/inc/navbar.blade.php @@ -16,12 +16,12 @@