Download the PHP package dropinblog/laravel-rendered without Composer
On this page you can find all versions of the php package dropinblog/laravel-rendered. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dropinblog/laravel-rendered
More information about dropinblog/laravel-rendered
Files in dropinblog/laravel-rendered
Package laravel-rendered
Short Description Official DropInBlog package for integrating DropInBlog with your Laravel application
License MIT
Homepage https://github.com/dropinblog/laravel-rendered
Informations about the package laravel-rendered
DropInBlog Laravel Rendered Package
This package allows you to easily integrate DropInBlog's rendered content into your Laravel application. It fetches pre-rendered HTML from DropInBlog's API and seamlessly integrates it into your Laravel views.
Requirements
- PHP 8.2 or higher
- Laravel 11.x, 12.x, or 13.x
- DropInBlog account with API access
Installation
-
Install the package via composer:
-
Publish the configuration file:
- Add your DropInBlog credentials to your
.envfile:
Configuration
The package publishes a configuration file at config/dropinblog.php with the following options:
id: Your DropInBlog IDapi_key: Your DropInBlog API keypath: The base URL path for your blog (defaults to 'blog')layout: The layout file that your blog views will extendsections.content: The section name in your layout where blog content will be displayedfeed.type: The default feed type (rss or atom)feed.limit: The default number of items in feeds
Upgrading from 1.1.x
The credential is now api_key / DROPINBLOG_API_KEY. Existing installs keep working without changes — the old api_token config key and DROPINBLOG_API_TOKEN variable are still read.
If you rename the variable in your .env, republish the config so it picks up the new key:
Usage
The package automatically registers routes for your blog at /blog (configurable via the path option). These include:
/blog- Blog index/blog/page/{page}- Paginated blog index/blog/{slug}- Individual post/blog/category/{slug}- Category index/blog/category/{slug}/page/{page}- Paginated category index/blog/author/{slug}- Author index/blog/author/{slug}/page/{page}- Paginated author index/blog/feed- RSS/Atom feed/blog/feed/category/{slug}- Category-specific feed/blog/feed/author/{slug}- Author-specific feed/blog/sitemap.xml- XML sitemap
Blade Directives
The package provides several Blade directives to help integrate DropInBlog content:
IMPORTANT: Add the
@dropInBlogHeaddirective to your layout's<head>section. This will add title, description, styles and more meta tags inside your<head>.
Avoiding Duplicate Head Elements
The @dropInBlogHead directive adds meta tags title, description, styles and more. Most likely you will already be setting some of these tags in your <head>. You can use directives to prevent any duplicates.
For proper implementation:
- Always place the
@dropInBlogHeaddirective in your layout's<head>section - Use the
@isDropInBlogand@notDropInBlogdirectives to conditionally include or exclude your own head elements
Example layout:
This ensures that on blog pages, the title and meta tags come from DropInBlog, while on non-blog pages, your own title and meta tags are used.
Customizing Views
If you want to customize the blog views, you can publish them:
The views will be published to resources/views/vendor/dropinblog/.
How It Works
This package fetches pre-rendered HTML from DropInBlog's API and displays it within your Laravel application. The rendered content includes:
bodyHtml: The main content of the pageheadHtml: HTML for the<head>section (meta tags, title, etc.)
The package handles all routing and view rendering for you, making it easy to integrate a fully-featured blog into your Laravel application without managing blog content in your database.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-rendered with dependencies
laravel/framework Version ^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.0