File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1818use Illuminate \Database \Eloquent \Model ;
1919use Illuminate \Database \Eloquent \Relations \BelongsTo ;
2020use Illuminate \Support \Carbon ;
21+ use Illuminate \Support \Collection as SupportCollection ;
2122use Illuminate \Support \Str ;
2223use Spatie \Feed \Feedable ;
2324use Spatie \Feed \FeedItem ;
@@ -192,10 +193,7 @@ public static function resolutionTime()
192193 }
193194 }
194195
195- /**
196- * retrieve 20 feed items with use of page parameter.
197- */
198- public static function getFeedItems ()
196+ public static function getFeedItems (): SupportCollection
199197 {
200198 return static ::feedQuery ()
201199 ->paginate (static ::FEED_PAGE_SIZE )
Original file line number Diff line number Diff line change 11<?php
22
3+ use App \Models \Thread ;
4+
35return [
46 'feeds ' => [
57 'forum ' => [
1113 * You can also pass an argument to that method:
1214 * ['App\Model@getAllFeedItems', 'argument']
1315 */
14- 'items ' => [' App\Models\ Thread@getFeedItems ' ],
16+ 'items ' => [Thread::class. ' @getFeedItems ' ],
1517
1618 /*
1719 * The feed will be available on this url.
1820 */
19- 'url ' => '/forum/rss ' ,
21+ 'url ' => '/forum/feed ' ,
2022
21- 'title ' => 'laravel .io Forum RSS Feed ' ,
23+ 'title ' => 'Laravel .io Forum RSS Feed ' ,
2224 ],
2325 ],
2426];
You can’t perform that action at this time.
0 commit comments