26b/laravel-content-pages
Composer 安装命令:
composer require 26b/laravel-content-pages
包简介
Laravel package for Content Pages
README 文档
README
Have a configurable controller to navigate pages of content.
- Supports multi levels.
- Configurable folder for blade templates.
- Optional catch-all route so you don't need to configure specific routes.
Getting started
Require the package
composer require 26b/laravel-content-pages
That's it, now, under the /resources/views/ create a folder called content (can be changed on the configuration) and place your blade templates there.
Once you have created a template, for example somepage.blade.php, you can point your browser to yourproject.test/somepage and you'll see your content.
Custom configuration
Publish the configuration file should you need to customise it.
php artisan vendor:publish --tag=content-pages-config
If for example you dont want to use the catch-all route, you can disable it on the config content-pages.php
fallback_route => false,
Then on your web routes you can add something like this.
Route::get('/pages/{any}', [PageController::class, 'show']);
统计信息
- 总下载量: 2.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-22