lopatin96/laravel-pages
最新稳定版本:1.0.34
Composer 安装命令:
composer require lopatin96/laravel-pages
包简介
Laravel pages
README 文档
README
Migrations
Run migrations:
php artisan migrate
Middleware
Add PageGateChecker middleware to middleware array in app/Http/Kernel.php:
protected $middleware = [ … \Atin\LaravelPages\Http\Middleware\PagesGateChecker::class, \Atin\LaravelPages\Http\Middleware\PersonalisedPage::class, ];
Folders
For each page create a folder. For example, for index.php page create app/resources/views/pages/index folder.
Config
Variables
Specify main variables (main colors, etc.)
'header_path' => 'sections.header', 'footer_path' => 'sections.footer', // Colors; Add all values to tailwind.config.js as `safelist` under `module.exports` 'gradient_from' => 'from-zinc-100', 'gradient_to' => 'to-emerald-300', 'text_color_primary' => 'text-emerald-400', 'text_color_secondary' => 'text-emerald-200', 'bg_color_primary' => 'bg-emerald-400', 'bg_color_secondary' => 'bg-emerald-200', 'color_primary_hex' => '#34d399', 'color_secondary_hex' => '#a7f3d0', 'main_button_color' => 'bg-gray-950', …
Pages
Specify which sections your page contain.
… 'pages' => [ 'index' => [ 'sections' => [ 'main' => [ 'name' => 'main', ], 'others' => [ [ 'name' => 'how-it-works', ], [ 'name' => 'stats', ], ] ] ] …
Publishing
Migrations
php artisan vendor:publish --tag="laravel-pages-migrations"
Localization
php artisan vendor:publish --tag="laravel-pages-lang"
Views
php artisan vendor:publish --tag="laravel-pages-views"
Config
php artisan vendor:publish --tag="laravel-pages-config"
统计信息
- 总下载量: 6.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-19