SSR Switch
This commit is contained in:
@@ -28,7 +28,7 @@ class ArticleResource extends JsonResource
|
||||
"readtime" => (new ReadTime($this->body))->get(),
|
||||
"source" => new SourceResource($this->source),
|
||||
"topics" => TopicResource::collection($this->topics),
|
||||
"link" => url(route('article.show',$this->id)),
|
||||
"link" => url(route('api.article.show',$this->id)),
|
||||
"published_date" => $this->published_date
|
||||
|
||||
];
|
||||
|
||||
@@ -19,7 +19,7 @@ class SourceResource extends JsonResource
|
||||
"slug" => $this->slug,
|
||||
"logo" => $this->logo,
|
||||
"url" => $this->url,
|
||||
"link" => url(route('sources.show', $this->slug))
|
||||
"link" => url(route('api.sources.show', $this->slug))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class TopicResource extends JsonResource
|
||||
"id" => $this->id,
|
||||
"name" => $this->name,
|
||||
"slug" => $this->slug,
|
||||
"link" => url(route('topics.show', $this->slug))
|
||||
"link" => url(route('api.topics.show', $this->slug))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user