Created
June 23, 2018 12:50
-
-
Save deleugpn/6ee57e2bdb4e1179112b31fe88eaea0e to your computer and use it in GitHub Desktop.
This file contains 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\Modules\Books\Resources; | |
use Illuminate\Http\Resources\Json\Resource; | |
class BookResource extends Resource | |
{ | |
public function toArray($request) | |
{ | |
return [ | |
'id' => $this->resource->id, | |
'title' => $this->resource->title, | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment