Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling on production server #464

Closed
KuenzelIT opened this issue Jan 27, 2016 · 2 comments
Closed

Handling on production server #464

KuenzelIT opened this issue Jan 27, 2016 · 2 comments

Comments

@KuenzelIT
Copy link

Hey,

since I require the generators only on my dev machine, they are missing on the production server. So I need to remove the Service Provider in Laravels app.php .

Is there some nice way to handle this besides removing that line from the config? (like some service provider dev or something else?)

Thank you!

@chrisforrence
Copy link

You can!

  1. Populate the environments in your bootstrap/start.php, such as a "local" entry.

    $env = $app->detectEnvironment(array(
    
        'local' => array('little-mac.local', 'lithium.local'), // replace with your own entries
    
    ));
    
  2. Within app/config/local/app.php, add the following entry:

    'providers' => append_config([
        'Way\Generators\GeneratorsServiceProvider',
    ]),
    

This will allow the artisan commands to only be available to environments defined in your bootstrap/start.php file.

@KuenzelIT
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants