Undefined Type error using willvincent/feeds

52 Views Asked by At

I'm getting the following error:

[{
    "resource": ".../app/Http/Controllers/HomeController.php",
    "owner": "_generated_diagnostic_collection_name_#0",
    "code": "1009",
    "severity": 8,
    "message": "Undefined type 'Feeds'.",
    "source": "intelephense",
    "startLineNumber": 60,
    "startColumn": 17,
    "endLineNumber": 60,
    "endColumn": 23
}]

I know the code might be a bit messy, i'm trying to learn the way it works by just start doing it! I brought the facades into scope with a use [facadeName] declaration in my HomeController.php

    <?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
use App\View\Composers\ProfileComposer;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\DB;
use willvincent\Feeds;

I tried every declaration that willvincent\feeds has to offer, but non of them worked.

The controller part that is requesting it is also in the HomeController.php:

    public function feedreader() {
        
        $feed = \Feeds::make('http://blog.case.edu/news/feed.atom');
        $data = array(
          'title'     => $feed->get_title(),
          'permalink' => $feed->get_permalink(),
          'items'     => $feed->get_items(),
        );
    
        return View::make('feed', $data);
      }
0

There are 0 best solutions below