1. Go to this page and download the library: Download vitebox/laravel-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/ */
vitebox / laravel-blog example snippets
use Vitebox\LaravelBlog\Facades\Blog;
Blog::assignRole($user, 'publisher');
Blog::roleOf($user); // BlogRole enum or null
Blog::can($user, 'posts.publish'); // bool
use Vitebox\LaravelBlog\Concerns\HasBlogRole;
class User extends Authenticatable { use HasBlogRole; }
$user->blogRole(); $user->hasBlogPermission('posts.review'); $user->blogPosts()->published()->get();
Event::listen(PostSubmittedForReview::class, fn ($e) => Notification::send($reviewers, new NeedsReview($e->post)));
namespace App\Blog;
use Vitebox\LaravelBlog\PostTypes\{PostType, Field};
class PodcastPost extends PostType
{
public function label(): string { return 'Podcast'; }
public function icon(): string { return '🎙️'; }
public function fields(): array
{
return [
Field::url('audio_url', 'Audio URL')->