Designs and API Routes
This commit is contained in:
@@ -17,7 +17,7 @@ class TopicsController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return TopicResource::collection(Topic::inRandomOrder()->take(14)->get());
|
||||
return TopicResource::collection(Topic::inRandomOrder()->take(12)->get());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -15,6 +15,7 @@ class TopicResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
"id" => $this->id,
|
||||
"name" => $this->name,
|
||||
"slug" => $this->slug,
|
||||
"link" => url(route('topics.show', $this->slug))
|
||||
|
Reference in New Issue
Block a user