PHP code example of bristol-digital / qwikblog

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

    

bristol-digital / qwikblog example snippets


Gate::define('manage-blog', fn(User $user) => $user->isAdmin());


return [
    [
        'title' => 'My Imported Post',
        'date' => '2025-01-15',
        'subtitle' => '...',
        'summary' => '...',
        'categories' => ['News'],
        'tags' => ['launch'],
        'author' => 'Jane Editor',
        'hero_image_url' => 'https://example.com/photo.jpg',
        'gallery_image_urls' => [
            'https://example.com/photo-2.jpg',
        ],
        'body' => <<<'MD'
# Markdown body here
MD,
    ],
];
bash
php artisan vendor:publish --tag=qwikblog-config
php artisan vendor:publish --tag=qwikblog-admin-js
bash
  php artisan vendor:publish --tag=qwikblog-views
  
bash
npm run dev
php artisan serve
bash
php artisan vendor:publish --tag=qwikblog-seeds
php artisan blog:examples flamenco
bash
php artisan blog:examples flamenco
bash
rm resources/posts/*.md
rm -rf public/images/blog/
php artisan blog:refresh
bash
php artisan vendor:publish --tag=qwikblog-views
bash
php artisan optimize:clear
bash
php artisan tinker --execute="dump(config('qwikblog.per_page'));"
bash
php artisan blog:refresh
bash
# Dev
npm run dev
php artisan serve

# After editing post files directly
php artisan blog:refresh

# After dropping in new components, commands or config
php artisan view:clear
php artisan optimize:clear

# Production build
npm run build