Skip to content

About

WordPress-style post types defined with a fluent API: meta fields (javaabu/meta), media (javaabu/mediapicker), block-editor content, routing, admin and public views in Blade and Inertia React, optional translatable

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post Types

Tests codecov Latest Version on Packagist License: MIT

WordPress-style post types for Laravel. Define news, events or pages fluently, and get admin pages, public archives and permalinks for each.

use Javaabu\PostTypes\Facades\PostTypes;
use Javaabu\PostTypes\PostType;
use Javaabu\PostTypes\Taxonomy;
use Javaabu\Stencil\Fields\TextInput;

// AppServiceProvider::boot()
PostTypes::taxonomy(Taxonomy::make('categories')->hierarchical());

PostTypes::register(
    PostType::make('news')
        ->labels('News article', 'News')
        ->supports(['content', 'excerpt', 'media', 'meta'])
        ->taxonomies(['categories'])
        ->metaFields([TextInput::make('subtitle')])
        ->permalink('{year}/{month}/{slug}')
);

// routes/web.php
Route::postTypesAdmin(['guard' => 'web_admin', 'prefix' => 'admin', 'name' => 'admin.']);
Route::postTypes();

Documentation

See the docs, or llms.txt for AI assistants.

License

The MIT License (MIT). See License File.

About

WordPress-style post types defined with a fluent API: meta fields (javaabu/meta), media (javaabu/mediapicker), block-editor content, routing, admin and public views in Blade and Inertia React, optional translatable

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages