Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make web installer for my Laravel application?

I know of @RachidLaasri/LaravelInstaller but it is rather a kind of different thing I want.

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.

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.

like image 593
Abel Agoi Avatar asked Nov 09 '22 21:11

Abel Agoi


1 Answers

Laravel Installer

add 2 router in your project.

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.

After then you might create database using php codes, How to make db Pdo and run \Artisan::call('migrate') in your Controller.

Rename route to installation-route using php rename method file. And rename route2 to route.

like image 118
Morteza Negahi Avatar answered Nov 14 '22 22:11

Morteza Negahi