diff --git a/app/Article.php b/app/Article.php index 1bf6314..20f99f8 100644 --- a/app/Article.php +++ b/app/Article.php @@ -32,6 +32,15 @@ class Article extends Model */ protected $guarded = []; + /** + * The attributes that should be mutated to dates. + * + * @var array + */ + protected $dates = [ + 'published_date', + ]; + /** * The attributes that should be cast. diff --git a/resources/views/articles/show.blade.php b/resources/views/articles/show.blade.php index deca654..b11dadf 100644 --- a/resources/views/articles/show.blade.php +++ b/resources/views/articles/show.blade.php @@ -29,7 +29,7 @@

{{$article->source->name}}

-

{{$article->published_date}}

+

{{$article->published_date->locale('dv')->isoFormat('Do MMMM YYYY | dddd | h:mm')}}

diff --git a/resources/views/topics/show.blade.php b/resources/views/topics/show.blade.php index 993f516..76ce795 100644 --- a/resources/views/topics/show.blade.php +++ b/resources/views/topics/show.blade.php @@ -3,7 +3,7 @@ @section('content')
-
+