From f6b456aa3d2d4e479aa04776a551a27018a9045c Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 8 Nov 2019 23:51:47 +1100 Subject: [PATCH] Initial welcome page --- app/{Model => Models}/Abstracted/Catalog.php | 10 ++-- app/{Model => Models}/Person.php | 4 +- app/{Model => Models}/Photo.php | 4 +- app/{Model => Models}/PhotoPerson.php | 4 +- app/{Model => Models}/PhotoTag.php | 4 +- app/{Model => Models}/Tag.php | 4 +- app/{Model => Models}/Video.php | 4 +- app/Providers/AppServiceProvider.php | 6 +-- resources/views/welcome.blade.php | 49 +++++++++++++------ .../views/widgets/summary/boxes.blade.php | 25 ++++++++++ 10 files changed, 79 insertions(+), 35 deletions(-) rename app/{Model => Models}/Abstracted/Catalog.php (98%) rename app/{Model => Models}/Person.php (77%) rename app/{Model => Models}/Photo.php (99%) rename app/{Model => Models}/PhotoPerson.php (78%) rename app/{Model => Models}/PhotoTag.php (88%) rename app/{Model => Models}/Tag.php (76%) rename app/{Model => Models}/Video.php (99%) create mode 100644 resources/views/widgets/summary/boxes.blade.php diff --git a/app/Model/Abstracted/Catalog.php b/app/Models/Abstracted/Catalog.php similarity index 98% rename from app/Model/Abstracted/Catalog.php rename to app/Models/Abstracted/Catalog.php index fe45f25..f1dba61 100644 --- a/app/Model/Abstracted/Catalog.php +++ b/app/Models/Abstracted/Catalog.php @@ -1,21 +1,23 @@ belongsToMany('App\Model\Person'); + return $this->belongsToMany(Person::class); } public function Tags() { - return $this->belongsToMany('App\Model\Tag'); + return $this->belongsToMany(Tag::class); } /** @@ -366,4 +368,4 @@ abstract class Catalog extends Model return $o->get(); } -} +} \ No newline at end of file diff --git a/app/Model/Person.php b/app/Models/Person.php similarity index 77% rename from app/Model/Person.php rename to app/Models/Person.php index 1dc0167..be02e27 100644 --- a/app/Model/Person.php +++ b/app/Models/Person.php @@ -1,9 +1,9 @@ ',url('/p/thumbnail/'.$this->id)); } -} +} \ No newline at end of file diff --git a/app/Model/PhotoPerson.php b/app/Models/PhotoPerson.php similarity index 78% rename from app/Model/PhotoPerson.php rename to app/Models/PhotoPerson.php index a84f6bb..8e15330 100644 --- a/app/Model/PhotoPerson.php +++ b/app/Models/PhotoPerson.php @@ -1,9 +1,9 @@ ',url('/v/view/'.$this->id)); } -} +} \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 4763556..8a71c5c 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -5,10 +5,8 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Foundation\Bus\DispatchesJobs; -use App\Model\Photo; -use App\Jobs\PhotoMove; -use App\Model\Video; -use App\Jobs\VideoMove; +use App\Models\{Photo,Video}; +use App\Jobs\{PhotoMove,VideoMove}; class AppServiceProvider extends ServiceProvider { diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 06e2217..c189e61 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,17 +1,36 @@ -@extends('layouts.app') +@extends('adminlte::layouts.app') -@section('content') -
-
-
-
-
Welcome
- -
- Your Application's Landing Page. -
-
-
-
-
+@section('htmlheader_title') + Main @endsection + +@section('contentheader_title') + Main +@endsection +@section('contentheader_description') +@endsection +@section('page_title') + Main +@endsection + +@section('main-content') +
+ @include('widgets.summary.boxes') +
+ + +
+
+
+
+

+
+ + +
+ +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/widgets/summary/boxes.blade.php b/resources/views/widgets/summary/boxes.blade.php new file mode 100644 index 0000000..5efbaa8 --- /dev/null +++ b/resources/views/widgets/summary/boxes.blade.php @@ -0,0 +1,25 @@ +
+
+ + +
+ Photos + {{ \App\Models\Photo::count() }} +
+ +
+ +
+ +
+
+ + +
+ Videos + {{ \App\Models\Video::count() }} +
+ +
+ +
\ No newline at end of file