From 8c0dc48d2d83d6680ede2f2e9ce35962bcfd6bbc Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 23 Apr 2018 23:15:54 -0400 Subject: [PATCH] Set the dashboard home title in its own blade, and bump a row's timestamp after uploading an image or file --- app/Http/Controllers/DashboardController.php | 16 +++++++--------- resources/views/dashboard/home.blade.php | 4 +++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index ad2bb6b..492e654 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -19,17 +19,15 @@ class DashboardController extends Controller { } /** - * Show the application dashboard + * Dashboard home */ public function getIndex() { - return view('dashboard.home', [ - 'heading' => 'Dashboard Home' - ]); + return view('dashboard.home'); } /** - * Show the dashboard credits + * Project credits */ public function getCredits() { @@ -237,11 +235,11 @@ class DashboardController extends Controller { file::makeDirectory($directory, 0755, true, true); $image = Image::make($request->file('file')); $image->save($directory . $request['id'] . '-' . $request['name'] . '.jpg'); + $item->touch(); + return 'success'; } else { return 'file-upload-fail'; } - - return 'success'; } else { return 'model-access-fail'; } @@ -272,11 +270,11 @@ class DashboardController extends Controller { $directory = base_path() . '/public/uploads/' . $request['model'] . '/files/'; file::makeDirectory($directory, 0755, true, true); $request->file('file')->move($directory, $request['id'] . '-' . $request['name'] . '.' . $request['ext']); + $item->touch(); + return 'success'; } else { return 'file-upload-fail'; } - - return 'success'; } else { return 'model-access-fail'; } diff --git a/resources/views/dashboard/home.blade.php b/resources/views/dashboard/home.blade.php index 417a1f4..d944884 100644 --- a/resources/views/dashboard/home.blade.php +++ b/resources/views/dashboard/home.blade.php @@ -1,4 +1,6 @@ -@extends('dashboard.core') +@extends('dashboard.core', [ + 'heading' => 'Dashboard Home' +]) @section('dashboard-body')