curder/laravel-landing-page
Composer 安装命令:
composer require curder/laravel-landing-page
包简介
Auto load static page and generate routes for laravel.
README 文档
README
项目支持对推广页面的本地模版管理和数据库配置管理通用解决办法。
感谢
环境要求
-
PHP >= 7.0.0
-
Laravel >= 5.5.0
-
Fileinfo PHP Extension
安装
composer require "curder/laravel-landing-page:^3.0"
配置
在 config/app.php 注册 ServiceProvider 和 Facade
'providers' => [
// ...
Curder\LandingPages\LandingPagesServiceProvider::class,
],
'aliases' => [
// ...
'LandingPage' => Curder\LandingPages\Facades\LandingPages::class,
],
创建配置文件和数据库迁移文件
php artisan vendor:publish --provider="Curder\LandingPages\LandingPagesServiceProvider"
修改应用根目录下的 config/landing-pages.php 中对应的参数即可。
创建数据表
使用下面的命令创建数据库表。
php artisan migrate
使用下面的命令在Tinker里面新增测试数据。
namespace Curder\LandingPages\Models;
LandingPage::forceCreate(['title' => 'test www title.', 'body' => 'test www body.', 'uri' => 'www/example', 'template' => 'landing-pages.www.example']);
LandingPage::forceCreate(['title' => 'test mobile title.', 'body' => 'test mobile body.', 'uri' => 'mobile/example', 'template' => 'landing-pages.mobile.example']);
发布路由和模版文件
php artisan landing-page:init
执行完上面的命令后将在routes/web.php中添加一条路由:
Route::get('{slug}/{one?}/{two?}/{three?}/{four?}/{five?}', '\Curder\LandingPages\Http\Controllers\LandingPagesController@show');
并且默认在resources/views/www/和resources/vies/mobile/下新建一个example.blade.php,您可以根据实际业务需求来自定义。
预览页面
通过下面的地址来访问页面的数据。
http://localhost/www/example
http://localhost/mobile/example
License
MIT
curder/laravel-landing-page 适用场景与选型建议
curder/laravel-landing-page 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.98k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 10 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 curder/laravel-landing-page 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 curder/laravel-landing-page 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-30