PHP code example of xoborg / laravel-blog

1. Go to this page and download the library: Download xoborg/laravel-blog library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xoborg / laravel-blog example snippets


php artisan vendor:publish --provider="Xoborg\LaravelBlog\LaravelBlogServiceProvider" --tag="config"

php artisan vendor:publish --provider="Xoborg\LaravelBlog\LaravelBlogServiceProvider" --tag="public" --force

php artisan storage:link

php artisan vendor:publish --provider="Xoborg\LaravelBlog\LaravelBlogServiceProvider" --tag="views"

// In routes/web.php
Route::feeds();

php artisan vendor:publish --provider="Spatie\Feed\FeedServiceProvider" --tag="config"

...
'items' => 'Xoborg\LaravelBlog\Models\Post@getFeedItems',
...

 @

...
'feed' => [
	/**
	 * The number of items that should appear in the feed
	 */
	'items' => 25
]
...
 php
php artisan laravel-blog:author --add 1 // User ID
 php
php artisan laravel-blog:author --remove 1 // User ID
 php
php artisan laravel-blog:author --list