tallieutallieu / dry-blog
Dry Blog
1.3.15
2025-09-10 14:00 UTC
Requires
- nesbot/carbon: ^2.73.0
- tallieutallieu/dry-datalist: ^1.0.11
- tallieutallieu/dry-dbi: ^1.0.23
- tallieutallieu/oak: ^1.1.15
- dev-master
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.1
- dev-feature/sc-8022--video-thumbnail-for-blogpost-block-type-file
This package is auto-updated.
Last update: 2025-09-10 14:02:03 UTC
README
Blog package for dry including migrations, backend managers, i18n support, categories, blocks, photos and authors.
Index
Installation
composer require tallieutallieu/dry-blog
php oak migration migrate -m blog
Config options
Name | Default |
---|---|
categories | true |
authors | true |
photos | true |
advanced-layout | true |
types | ['text-photo', 'photo-text', 'text', 'text-frame', 'quote', 'quote-text', 'text-quote', 'text-video', 'video-text'] |
languages | ['nl', 'en', 'fr'] |
private | false |
required-fields | ['photo', 'title', 'slug', 'publication_date'] |
publication_timestamp | false |
video_types | ['file', 'vimeo', 'youtube'] |
Usage
Register the service provider
<?php $app = new \Oak\Application(); $app->register([ \Tnt\Blog\BlogServiceProvider::class, ]); $app->bootstrap();
Implementation example
Controller
<?php class blog extends base { public static function index(Request $request, Page $page) { $app = Application::get(); $dataList = $app->getWith(DataListInterface::class, [ 'repository' => BlogPosts::published()->recent(), 'urlBuilder' => $app->getWith(BuilderInterface::class, [ 'base' => \dry\url('pages::view', $page), ]), ]); $tpl = parent::get_base_template($request, $page); $tpl->blogPosts = $dataList->getResults(); $tpl->render('blog/index.tpl'); } }