Last active
January 28, 2021 03:40
-
-
Save jsdecena/87619aa150940b1d869e1e7ea770e363 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; | |
use App\Articles\Article; | |
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