- Can I use this package with Laravel 10? The README says it requires Laravel 11/12/13.
- No, this package explicitly requires Laravel 11 or higher due to Livewire 3.5+ dependencies and PHP 8.3+ features. If you're on Laravel 10, you’ll need to upgrade to use it. The package leverages Laravel’s newer features like model macros and improved Livewire integration.
- How do I restrict access to the admin panel if I’m not using Laravel Breeze or Jetstream?
- The package doesn’t include auth logic—you configure it via middleware in `config/blog.php`. Use Laravel’s built-in `Gate`, `can` middleware, or a custom guard (e.g., `auth:admin`). For example, set `'admin_middleware' => ['web', 'auth', 'can:manage-blog']` and define the `manage-blog` gate in your `AuthServiceProvider`.
- Will this work with my existing Tailwind CSS setup, or do I need to add more dependencies?
- The package uses Tailwind utility classes only—no custom CSS compilation is required. If you already have Tailwind in your project, it will work out of the box. If not, you’ll need to install Tailwind CSS separately (via npm or Laravel’s built-in Tailwind support) to render the admin UI and public views.
- Is there a way to add SEO metadata (like OpenGraph tags) to blog posts without customizing views?
- The package doesn’t include built-in SEO tags, but you can extend it by publishing the views (`php artisan vendor:publish --tag=simple-blog-views`) and modifying the `public.post` Blade template. Alternatively, use Laravel’s `share` package or middleware to dynamically inject metadata based on the post’s slug or ID.
- How does draft preview work in production? Will it break my deployment pipeline?
- Draft previews open in a new tab with a temporary URL (e.g., `yourdomain.com/blog/preview?draft=123`). This uses Laravel’s built-in URL generation and doesn’t require additional routes or middleware. However, ensure your deployment pipeline handles dynamic query parameters gracefully, as preview URLs are ephemeral and won’t conflict with live routes.
- Can I use this package for a high-traffic blog, or is it only suitable for small projects?
- The package is lightweight and performant for moderate traffic, but it lacks built-in caching for posts. For high-traffic sites, manually implement Laravel’s cache tags (e.g., `Cache::tags(['blog-post'])->remember()`) or use a package like `spatie/laravel-caching` to cache post listings and individual posts by slug.
- What if I want to allow user-generated Markdown (e.g., comments) instead of just posts?
- The package’s Markdown parser escapes HTML by default to prevent XSS, but it doesn’t validate or sanitize user-generated content beyond that. For comments, consider using a dedicated package like `spatie/laravel-commentable` or implementing a separate Markdown sanitizer (e.g., `masterminds/html5` with a whitelist) before rendering.
- Do I need to know Livewire to customize the admin panel, or can I tweak it with Blade templates?
- You don’t need Livewire expertise to use the package’s core features, but customizing the admin UI (e.g., adding fields to the Livewire CRUD) requires familiarity with Livewire’s component structure. Publish the views (`--tag=simple-blog-views`) to override Blade templates for the public listing without touching Livewire.
- Are there alternatives to this package that include built-in authentication or social sharing?
- If you need auth, consider `spatie/laravel-blog` (includes basic auth) or `orchid/software` (enterprise-grade CMS). For social sharing, add packages like `spatie/laravel-share-buttons` post-install. This package prioritizes minimalism—auth and sharing are left to your app’s existing stack to avoid bloat.
- How do I change the database schema if I need additional fields (e.g., post categories or tags)?
- Publish the migrations (`--tag=simple-blog-migrations`) and extend the `Post` model in your app. Add columns to the `posts` table via a new migration, then update the model’s `$fillable` and any Livewire properties. The package’s Livewire CRUD will automatically reflect changes if you republish the views and adjust the form logic.