Last active
January 28, 2021 03:43
-
-
Save jsdecena/a5e7a41dbc4c9cc575d8ff2cd51bc5d7 to your computer and use it in GitHub Desktop.
Articles Api Controller Class
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\Api; | |
class ArticlesApiController extends Controller | |
{ | |
/** | |
* @param CreateArticleRequest $request | |
*/ | |
public function store(CreateArticleRequest $request) { | |
return response()->json(['data' => Article::create($request->all())]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment