PHP code example of ajaydhakal / filament-story

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

    

ajaydhakal / filament-story example snippets


use AjayDhakal\FilamentStory\FilamentStoryPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(FilamentStoryPlugin::make());
}

return [
    'panel_id' => null,
    'ai_enabled' => true,
    'ai_provider' => env('FILAMENT_STORY_AI_PROVIDER', 'openrouter'),
    'ai_model' => env('FILAMENT_STORY_AI_MODEL', 'openai/gpt-4o'),
    'ai_api_key' => env('FILAMENT_STORY_AI_API_KEY'),
    'ai_generation_timeout' => env('FILAMENT_STORY_AI_GENERATION_TIMEOUT', 180),
    'frontend_enabled' => true,
    'api_enabled' => true,
    'routes_prefix' => 'blogs',
    'pagination' => 10,
];
bash
php artisan filament-story:install
bash
php artisan vendor:publish --tag=filament-story-config
bash
php artisan vendor:publish --tag=filament-story-migrations
bash
php artisan migrate
bash
php artisan filament-story:publish-scheduled
text
/blogs
/blogs/{slug}
/blogs/category/{category}