PHP code example of abr4xas / simple-blog

1. Go to this page and download the library: Download abr4xas/simple-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/ */

    

abr4xas / simple-blog example snippets


$user->articles()->create([
    'title' => 'My first fake post',
    'slug' => 'my-first-post',
    'excerpt' => 'The excerpt of this fake post',
    'body' => 'The body of this fake post',
    'status' => ArticleStatus::PUBLISHED(), // ArticleStatus::DRAFT()
    'file' => 'https://i.pinimg.com/originals/4f/e7/06/4fe7066d4f3aa7201e38484230fc32b3.jpg',
]);
bash
php artisan vendor:publish --provider="Abr4xas\SimpleBlog\SimpleBlogServiceProvider" --tag="simple-blog-migrations"
php artisan migrate