ChristArt's avatar

Return type in PHPDoc doesn't match

When you make a resource controller via Artisan is populates every CRUD method with a DocBlock which specify "Response" as its return type. But it seems every tutorial/help example I see uses "Veiw" or a redirect as the return. I would love to see a tutorial that demonstrates the intent of DocBlocks placed by artisan make:controller MyController --resource

0 likes
1 reply
bugsysha's avatar

I guess it originated from the fact for Response and JsonResponse classes. If you have return response()->json() you will have a chance to follow what is declared in DocBlocks.

Please or to participate in this conversation.