Created
September 7, 2017 05:16
-
-
Save developerdino/d3f57b813b888369c00b39958bef259c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Article; | |
use App\Http\Resources\ArticleResource; | |
use App\Http\Resources\ArticlesResource; | |
use Illuminate\Http\Request; | |
class ArticleController extends Controller | |
{ | |
/** | |
* Display the specified resource. | |
* | |
* @param \App\Article $article | |
* | |
* @return ArticleResource | |
*/ | |
public function show(Article $article) | |
{ | |
ArticleResource::withoutWrapping(); | |
return new ArticleResource($article); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment