Skip to content

Instantly share code, notes, and snippets.

@developerdino
Created September 7, 2017 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save developerdino/d3f57b813b888369c00b39958bef259c to your computer and use it in GitHub Desktop.
Save developerdino/d3f57b813b888369c00b39958bef259c to your computer and use it in GitHub Desktop.
<?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