Add navigationGroup to UrlLinkResource
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -24,7 +25,7 @@ class ClientPostListResource extends JsonResource
|
||||
'authors' => $this->authors,
|
||||
'preview' => $this->preview,
|
||||
'reading_time' => $this->reading_time,
|
||||
'created_post' => $this->created_at->diffforhumans(),
|
||||
'created_post' => Carbon::parse($this->publish_at)->diffforhumans(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class PostResource extends JsonResource
|
||||
'authors' => $this->authors,
|
||||
'gallery' => $this->images,
|
||||
'reading_time' => $this->reading_time,
|
||||
'created_post' => $this->created_at->diffforhumans(),
|
||||
'created_post' => Carbon::parse($this->publish_at)->diffforhumans(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -18,7 +19,7 @@ class PostSearchResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'slug' => $this->slug,
|
||||
'created_post' => $this->created_at->diffforhumans(),
|
||||
'created_post' => Carbon::parse($this->publish_at)->diffforhumans(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -22,7 +23,7 @@ class PostThumbnailResource extends JsonResource
|
||||
'category' => $this->category,
|
||||
'authors' => $this->authors,
|
||||
'preview' => $this->preview,
|
||||
'created_post' => $this->created_at->diffforhumans(),
|
||||
'created_post' => Carbon::parse($this->publish_at)->diffforhumans(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user