PHP code example of creode / laravel-nova-blog

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

    

creode / laravel-nova-blog example snippets


// config/nova-blog.php
return [
    ...
    'post_model' => App\NovaBlog::class,
    ...
];

// config/app.php
'providers' => [
    ...
    Creode\LaravelNovaBlog\Providers\RouteServiceProvider::class,
    ...
],

use Creode\LaravelNovaBlog\Repositories\BlogRepository;

$blogRepository = new BlogRepository();
$blogs = $blogRepository->all();
bash
php artisan migrate
bash
php artisan vendor:publish --tag="nova-blog-config"
bash
php artisan vendor:publish --tag="nova-blog-views"
bash
php artisan db:seed --class="Creode\LaravelNovaBlog\Database\Seeders\BlogDatabaseSeeder"