PHPackages                             tiderjian/lara-for-tp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. tiderjian/lara-for-tp

ActiveProject[Framework](/categories/framework)

tiderjian/lara-for-tp
=====================

laravel for tp3.2 as a tools

v1.2.6(6y ago)12183[1 PRs](https://github.com/quansitech/lara-for-tp/pulls)MITPHPPHP &gt;=7.2.0CI failing

Since Apr 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/quansitech/lara-for-tp)[ Packagist](https://packagist.org/packages/tiderjian/lara-for-tp)[ RSS](/packages/tiderjian-lara-for-tp/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (6)Versions (31)Used By (0)

Lara for Tp
===========

[](#lara-for-tp)

[![Travis (.com)](https://camo.githubusercontent.com/22abcd2d4e7d4c0dff4c2daf2637725ebfb46aa4ffaa0abd25f4e327a63d1627/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/22abcd2d4e7d4c0dff4c2daf2637725ebfb46aa4ffaa0abd25f4e327a63d1627/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)[![style ci](https://camo.githubusercontent.com/22abcd2d4e7d4c0dff4c2daf2637725ebfb46aa4ffaa0abd25f4e327a63d1627/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/22abcd2d4e7d4c0dff4c2daf2637725ebfb46aa4ffaa0abd25f4e327a63d1627/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)[![download](https://camo.githubusercontent.com/d7c07bd1563be36a842f7dd06ab69774a443434c91cccb49f9150c6acc02f175/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/d7c07bd1563be36a842f7dd06ab69774a443434c91cccb49f9150c6acc02f175/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696465726a69616e2f6c6172612d666f722d74702e7376673f7374796c653d666c61742d737175617265)[![lincense](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)[![LICENSE](https://camo.githubusercontent.com/be80b8cb211ceb2263744e99fdb161a40124901906fd7c7f47d6361760dd7e8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d416e74692532303939362d626c75652e737667)](https://github.com/996icu/996.ICU/blob/master/LICENSE)[![Pull request welcome](https://camo.githubusercontent.com/25f2db1404306d6dc01b1ac6e8c70f5f397ea8043dd9584d8dc4bc31b8bfea59/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70722d77656c636f6d652d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/25f2db1404306d6dc01b1ac6e8c70f5f397ea8043dd9584d8dc4bc31b8bfea59/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70722d77656c636f6d652d677265656e2e7376673f7374796c653d666c61742d737175617265)

介绍
--

[](#介绍)

由于还有很多老旧但又重要的项目依然采用tp3.2来实现，Lara for Tp就是为了让过时的tp能使用laravel的migrate数据库版本管理及laravel dusk的功能，以实现更科学的开发部署方法。

安装
--

[](#安装)

安装[qs\_cmf](https://github.com/tiderjian/qs_cmf)

composer安装

```
composer require tiderjian/lara-for-tp

```

安装后执行vendor/bin/larafortp 脚本，完成自动安装。

使用
--

[](#使用)

目前支持的laravel功能有 migrate、make:model、make:seeder、db:seed，具体用法请自行查阅laravel手册。

migrate文件必须存放在lara/database/migrations下,在lara目录下的.env文件中配置要访问的数据库,然后在项目根目录执行php artisan migrate即可完成数据库的迁移，相关的migrate命令可查看[laravel文档](https://learnku.com/docs/laravel/5.8/migrations/3928)。

测试脚本必须存放到lara/tests路径下，继承该目录下的TestCase类。配置phpunit.xml文件，设置可用于测试使用的数据库及web服务地址端口。最后运行phpunit，执行测试脚本。关于laravel dusk的使用请查阅[laravel文档](https://learnku.com/docs/laravel/5.8/dusk/3943)。

文档
--

[](#文档)

### MenuGenerate

[](#menugenerate)

用于生成后台的菜单选项

#### 案例一

[](#案例一)

```
