I know of @RachidLaasri/LaravelInstaller but it is rather a kind of different thing I want.
我知道@ RachidLaasri / LaravelInstaller,但这是我想要的一种不同的东西。
I want to do something like, go to a URL like localhost::8000/installer. Then, it will display a page for super admin registration, i.e., email, password, and username. Note: I want to eliminate the ability of making my superadmin app user going to the UsersTableSeeder to configure anything.
我想做类似的事情,转到像localhost :: 8000 / installer这样的URL。然后,它将显示超级管理员注册的页面,即电子邮件,密码和用户名。注意:我想要消除让我的superadmin应用程序用户访问UsersTableSeeder来配置任何内容的能力。
Then, when I click on install, it migrate my seeded classes. I currently watched the command line app but still can't really figure out how to go about this.
然后,当我点击安装时,它会迁移我的种子类。我目前正在观看命令行应用程序,但仍然无法弄清楚如何解决这个问题。
Any advice / tip will be appreciated.
任何建议/小费将不胜感激。
2 个解决方案
#1
0
Laravel安装程序
add 2 router in your project.
在项目中添加2个路由器。
http :
routes.php
routes2.php
---
view
application/
installation/
in first route you should take db name and more information you need from user. Save db name to .evn file.
在第一个路由中,您应该从用户获取所需的数据库名称和更多信息。将数据库名称保存到.evn文件。
After then you might create database using php codes, How to make db Pdo and run \Artisan::call('migrate') in your Controller.
之后,您可以使用php代码创建数据库,如何在您的Controller中创建db Pdo并运行\ Artisan :: call('migrate')。
Rename route to installation-route using php rename method file. And rename route2 to route.
使用php rename方法文件将路由重命名为安装路由。并将route2重命名为route。
#2
-1
Have you tried this PHP Application Installer
你试过这个PHP应用程序安装程序吗?
This library can be used for PHP appplication configuration(database, admin credentials etc) using user interface.
该库可以使用用户界面用于PHP应用程序配置(数据库,管理员凭据等)。
#1
0
Laravel安装程序
add 2 router in your project.
在项目中添加2个路由器。
http :
routes.php
routes2.php
---
view
application/
installation/
in first route you should take db name and more information you need from user. Save db name to .evn file.
在第一个路由中,您应该从用户获取所需的数据库名称和更多信息。将数据库名称保存到.evn文件。
After then you might create database using php codes, How to make db Pdo and run \Artisan::call('migrate') in your Controller.
之后,您可以使用php代码创建数据库,如何在您的Controller中创建db Pdo并运行\ Artisan :: call('migrate')。
Rename route to installation-route using php rename method file. And rename route2 to route.
使用php rename方法文件将路由重命名为安装路由。并将route2重命名为route。
#2
-1
Have you tried this PHP Application Installer
你试过这个PHP应用程序安装程序吗?
This library can be used for PHP appplication configuration(database, admin credentials etc) using user interface.
该库可以使用用户界面用于PHP应用程序配置(数据库,管理员凭据等)。