Best way to set-up a package via Web?

Posted 7 months ago by Tetravalence

Hi, my package needs some records in the tables to work, for example the name of default theme, the e-mail of the site owner, etc. What's the best approach to this? I use a conditional statement in the route file together to a Controller that runs some routine, for example in routes/web.php

if (!file_exists(config_path().'/myapp.php')) {
    Route::get('/', '[email protected]');
} else {
   Route::get('/', '[email protected]');
}

So, if myapp.php file does not exist in config directory then MyApp runs the Web installer. The alternative is to use artisan vendor:publish from command line. Is this the correct way to proceed?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.