简体   繁体   中英

php artisan vendor publish not working

I use laravel 5.5 and install

composer require roumen/feed

I try to load file vendor in my ressource folder for change pagination code. When i try the php artisan like this

php artisan vendor:publish

it is no working.

FeedController

<?php

namespace App\Http\Controllers;

use App\Article;
use Illuminate\Http\Request;

class FeedController extends Controller
{
    public function articles()
    {
        $feed = app()->make('feed');

        $feed->setCache(1,'laravel.feed.article');

        if(! $feed->isCached() ) {
            $articles = Article::latest()->take(10)->get();

            foreach ($articles as $article) {
                $feed->add($article->title,$article->user->name, url($article->path()),$article->created_at , strip_tags($article->description) , strip_tags($article->body));
            }
        }

        return $feed->render('rss');
    }
}

my blade

<link rel="alternate" type="application/rss+xml" title="فید مقالات راکت" href="/feed/articles">

But i run http://localhost:8000/feed/articles similar under image.

Simple

Copying from the Packagist

Register this service provider with Laravel :

Roumen\Feed\FeedServiceProvider::class,

and add class alias :

'Feed' => Roumen\Feed\Feed::class,

Publish package views (OPTIONAL) :

php artisan vendor:publish --provider="Roumen\Feed\FeedServiceProvider"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM