From 572b48d85144d30772b1de851f978f28bbe58948 Mon Sep 17 00:00:00 2001
From: Brandon Clothier
Date: Sat, 17 Jun 2017 01:20:35 -0400
Subject: [PATCH] LastModifiedServiceProvider: Return a Carbon instance.
base.blade: Use app()->getLocale for a bugfix for this issue: https://github.com/laravel/framework/pull/19405
Also check the environment and only add site verification meta if in production.
footer-error.blade: If running in production use HTTPS on the image URL, otherwise don't.
Also intval the year when comparing it to 2017.
Format the Carbon instance,
footer.blade: Only render social media widget buttons if in production mode.
Also intval year before comparing and format the Carbon instance.
index.blade: Bring OpenGraph title in line iwth website title.
Intval the year when comparing it to 2017.
Add sameAs meta for my social media pages.
Add a WebSite schema.
Only include the social media JavaScript if in production.
about.blade: Remove extra closing p tag.
resume.blade: Only use HTTPS if in production mode on profile image.
---
app/Providers/LastModifiedServiceProvider.php | 5 ++--
resources/views/base.blade.php | 4 ++-
.../views/components/footer-error.blade.php | 6 ++---
resources/views/components/footer.blade.php | 8 +++---
resources/views/index.blade.php | 27 ++++++++++++++++---
resources/views/sections/about.blade.php | 1 -
resources/views/sections/resume.blade.php | 2 +-
7 files changed, 38 insertions(+), 15 deletions(-)
diff --git a/app/Providers/LastModifiedServiceProvider.php b/app/Providers/LastModifiedServiceProvider.php
index d8472e3..4fbe37b 100644
--- a/app/Providers/LastModifiedServiceProvider.php
+++ b/app/Providers/LastModifiedServiceProvider.php
@@ -2,6 +2,7 @@
namespace App\Providers;
+use Carbon\Carbon;
use RecursiveIteratorIterator;
use RecursiveDirectoryIterator;
use Illuminate\Support\ServiceProvider;
@@ -37,7 +38,7 @@ public function register()
/**
* Function to get the last modified file time for the web application directory.
*
- * @return string
+ * @return \Carbon\Carbon
*/
protected function getLastModifiedDate()
{
@@ -53,6 +54,6 @@ protected function getLastModifiedDate()
}
}
- return date('F jS, Y', $timeStamp).' at '.date('h:i:s A T', $timeStamp);
+ return Carbon::createFromTimestamp($timeStamp);
}
}
diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php
index 64e2e25..a64d71a 100644
--- a/resources/views/base.blade.php
+++ b/resources/views/base.blade.php
@@ -1,5 +1,5 @@
-
+
@@ -11,6 +11,7 @@
@yield('social-media-meta', '')
+ @if(config('app.env') === 'production')
@@ -19,6 +20,7 @@
+ @endif
@yield('title', config('app.name'))
diff --git a/resources/views/components/footer-error.blade.php b/resources/views/components/footer-error.blade.php
index e4bb9df..0920d1a 100644
--- a/resources/views/components/footer-error.blade.php
+++ b/resources/views/components/footer-error.blade.php
@@ -5,7 +5,7 @@