A simple content package for pages and blog posts for Laravel applications using Nova
Open Issues: 0
- illuminate/support: ^8.0
- orchestra/testbench: ^6.21
- phpunit/phpcov: ^8.2
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2023-03-20 00:32:57 UTC
This is a simple package for managing simple content. If all you need is to simplify the boilerplate of setting up Nova resources for things like blog posts and pages with total control over the view, this is for you. If you want complex hierarchical categorization and deep control over the post and page models then this package likely isn't a good fit.
- >= Laravel 8
- >= Laravel Nova 3
- Nova resource pages for Posts and Pages
- Independently configurable caching for Posts and Pages
- Event driven caching based on resource Update and Delete
- Unopinionated view templates – write your own!
- Configurable Page and Post route prefix (such as /blog, /content)
- 100% test coverage
composer require carlson/nova-simple-content
- To copy the views for editing:
php artisan vendor:publish --tag=nova-simple-content-views
- To copy the config to customize caching and routes:
php artisan vendor:publish --tag=nova-simple-content-config
- To set up the required tables:
php artisan migrate
The following values may be configured in the
nova-simple-content.php config file:
cache_posts: Turns caching on or off for Posts. Default is
cache_pages: Turns caching on or off for Pages. Default is
post_list_url: The route for the post list. Default is
post_detail_slug_prefix: The route prefix for posts, e.g. the '/blog' in /blog/test-slug. Default is
page_slug_prefix: The route prefix for all pages, e.g. the '/content' in /content/test-slug. Default is
Caching of both Pages and Posts is turned on by default, but can be configured independently. To disable either Post or Page caching edit the corresponding value in the
nova-simple-content.php config file.
Contributions welcome! There is an included
docker-compose.yml with containers for the correct version of PHP with required dependencies and database and cache containers for testing.
- Clone this repository.
- Ensure Docker is already installed on your machine.
- From the repository root run
docker-compose up -dfrom your terminal.
docker exec -it nova_simple_content_app /bin/bash) and run