PHP code example of sajdoko / tallpress

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

    

sajdoko / tallpress example snippets


// Display recent posts in your app
$recentPosts = \Sajdoko\TallPress\Models\Post::published()
    ->latest('published_at')
    ->limit(5)
    ->get();

// Create a post programmatically
$post = Post::create([
    'title' => 'My First Blog Post',
    'excerpt' => 'A brief introduction',
    'body' => '## Hello World

This is **Markdown** content.',
    'status' => 'published',
    'author_id' => auth()->id(),
]);
bash
composer vendor:publish --provider="Sajdoko\TallPress\TallPressServiceProvider" --tag=tallpress-config
php artisan migrate
bash
php artisan tallpress:install --seed