for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ergare17\Articles\Http\Controllers;
use Auth;
use Ergare17\Articles\Models\Article;
/**
* Class APIUserArticlesController.
*
* @package App\Http\Controllers
*/
class APIUserArticlesController extends Controller
{
* Show list of articles.
* @return \Illuminate\Database\Eloquent\Collection|static[]
public function index()
return Auth::user()->articles;
}
* Store article for logged user.
public function store(UserStoreArticle $request)
$article = Article::create($request->only(['name','user_id','description']));
create()
Ergare17\Articles\Models\Article
created()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
Auth::user()->articles()->save($article);
return $article;
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.