bpocallaghan / titan
laravel项目的核心框架(Laravel Admin Starter)。
Requires
- php: ^7.2
- bpocallaghan/alert: ^1.1
- bpocallaghan/impersonate: ^1.0
- bpocallaghan/notify: ^2.1
- bpocallaghan/sluggable: ^1.2
- google/recaptcha: ^1.2
- guzzlehttp/guzzle: ^6.3
- intervention/image: ^2.4
- spatie/laravel-analytics: ^3.6
Requires (Dev)
- dev-master
- 1.3.1
- 1.3.0
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/npm_and_yarn/resources/assets_setup/webpack-5.76.1
- dev-dev
This package is auto-updated.
Last update: 2024-09-15 11:51:47 UTC
README
一个用于日常网站建设的Laravel网站和Admin框架。该项目是Laravel Starter的核心框架。请查看此链接以获取详细的功能列表和其他信息。
测试驱动开发
- titan-starter
- 我从零开始,使用新的测试驱动版本。最终目标是专注于TDD,更通用且易于自定义,有助于加快您的网站开发速度。
- 用户:github@bpocallaghan.ie
- 密码:github
Titan为您打包得很好,您只需执行以下操作;
- 安装laravel
- composer require titan package
- *创建数据库
- *设置虚拟主机/主机文件
- 运行titan:setup命令
- 运行titan:install命令
- 运行titan:migrate命令(可选)
- *打开浏览器
然后您就有了一个带有所有功能的Titan Admin Starter项目,可以开始编码了。
安装
更新项目的composer.json
文件。
composer require bpocallaghan/titan
php artisan titan:setup
它将执行以下操作
php artisan titan:publish --files=website
- 更新
app\User.php
- 更新
routes\web.php
- 更新
app\Http\Kernel.php
- 更新
app\Http\Handler.php
- 更新
config\app.php
php artisan titan:install
它将执行以下操作
- 更新
.env
php artisan migrate
php artisan titan:db:seed
php artisan titan:publish --files=auth
php artisan titan:migrate --name=
它将执行以下操作
- 指定要迁移的'table types'
博客、文档、常见问题、位置、新闻、通讯订阅者、照片、客户评价、商店
(Optional) Mail Layout php artisan vendor:publish --tag=laravel-notifications Mail Component php artisan vendor:publish --tag=laravel-mail
这将为您发布邮件Blade文件以供编辑。
详细安装步骤
php artisan migrate
这将创建所需的'core/minimum'表(用户表将被修改)。您可以运行php artisan migrate --name=blog
来包含迁移表。
php artisan titan:db:seed
这将填充核心表以开始使用
- 角色
- 横幅
- 页面
- 导航管理
php artisan titan:publish --files=website
这将复制所有与Website
相关的文件到您的应用程序。
- 视图、控制器和数据库种子
- webpack.mix.js和packages.json
- 资源/资产和公共/资产(css、js、字体、图片)
打开routes\web.php
并取消注释home
路由。
打开app\Http\Kernel.php
并在$routeMiddleware
列表的末尾添加以下内容。
'role' => \Bpocallaghan\Titan\Http\Middleware\ValidateRole::class, 'auth.admin' => \Bpocallaghan\Titan\Http\Middleware\AuthenticateAdmin::class,
这是为了注册Admin中间件
- 认证管理 - 如果登录用户有
admin
角色。 - 验证角色 - 管理用户可以有多个角色,根据这些角色筛选导航。
命令
发布命令用于将文件从titan复制到您的应用程序进行自定义。例如,您需要向表中添加或更改字段,或更新Blade文件中的文本或设计。
php artisan titan:publish --files=app php artisan titan:publish --files=assets php artisan titan:publish --files=auth php artisan titan:publish --files=banner php artisan titan:publish --files=config php artisan titan:publish --files=database php artisan titan:publish --files=events php artisan titan:publish --files=helpers php artisan titan:publish --files=pages php artisan titan:publish --files=public php artisan titan:publish --files=routes php artisan titan:publish --files=website
php artisan titan:publish --files=app
这将复制所有Models
、Views
和Controllers
到您的应用程序。这还将复制所有routes
和RouteServiceProvider
到您的应用程序。
php artisan titan:publish --files=assets
这将复制所有assets (css、js、字体、图片)
和webpack.js、package.json
到您的应用程序。
php artisan titan:publish --files=auth
这将复制所有与认证相关的Models
、Views
和Controllers
到您的应用程序。
php artisan titan:publish --files=banner
这将复制所有与横幅相关的Models
、Views
和Controllers
到您的应用程序。
php artisan titan:publish --files=config
此操作会将泰坦的配置文件复制到您的应用中。您可以更改管理界面皮肤(蓝色、红色、绿色等)。
php artisan titan:publish --files=database
此操作会将 database/seeds
和 database/migrations
复制到您的应用中。
php artisan titan:publish --files=events
此操作会将所有 Events
、Listeners
、Mails
和 Notifications
复制到您的应用中。
php artisan titan:publish --files=helpers
此操作会将所有 Helpers
和 HelperServiceProvider
复制到您的应用中。
php artisan titan:publish --files=public
此操作会将所有 public
(编译后的 CSS、JS 以及字体和图片)复制到您的应用中。
php artisan titan:publish --files=routes
此操作会将所有 routes
和 RouteServiceProvider
复制到您的应用中。
php artisan titan:publish --files=website
此操作会将所有与 Website
相关的文件复制到您的应用中(视图、控制器、资源)。
注意:如果您不打算运行 php artisan titan:publish --files=routes
,请记住将路由添加到您的应用中。
待办事项
- 安装命令,删除 Laravel 安装的文件(public/svg)
- 创建配置文件(不加载路由等)
为以下创建新包:
- *横幅
- *活动
- *谷歌分析
- 等等