Cannot use App\Http\Request as Request because the name is already in use

Posted 4 months ago by jet

how can I do to fix this?

here are my codes

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Request;
use App\Article;
use App\Http\Resource\Article as ArticleResource;

class ArticleController extends Controller
     * Display a listing of the resource.
     * @return \Illuminate\Http\Response
    public function index()
        //Get articles
        $articles = Article::paginate(15);

        //Return collection of articles as a resource
        return ArticleResource::collection($articles);

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.