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

Error with Laravel 5.1 (with fix) #30

Open
isometriq opened this issue Aug 11, 2015 · 4 comments
Open

Error with Laravel 5.1 (with fix) #30

isometriq opened this issue Aug 11, 2015 · 4 comments

Comments

@isometriq
Copy link

I could not use it directly in laravel 5.1 because of:

public function boot()
{
$this->package('nwidart/db-exporter');
}

To fix it, i overriden these classes in my app:
DbExportHandlerServiceProvider
DbMigrationsServiceProvider

to have the boot() method empty
(no call to ->package which does not exists)

@tynamc
Copy link

tynamc commented Sep 9, 2015

how To fix it

@limingyao-xx
Copy link

how To fix it ? please help me

@isometriq
Copy link
Author

I don't have sample code..

What I did was create my own service provider class by extending the original one. The class overrides the boot() method so that it is empty. Then I've modified the /config/app.php to use my classes instead of the original ones.

Does that makes sense?

@raywill
Copy link

raywill commented Aug 15, 2016

For Laravel 5 users, using following steps could fix it:

step 1

comment out $this->package('nwidart/db-exporter'); in both files:

vendor/nwidart/db-exporter/src/Nwidart/DbExporter/DbExportHandlerServiceProvider.php
vendor/nwidart/db-exporter/src/Nwidart/DbExporter/DbMigrationsServiceProvider.php

after edit:

    public function boot()
    {
        // $this->package('nwidart/db-exporter');
    }

step 2

edit config/app.php, add

        'Str'       => Illuminate\Support\Str::class,

to 'aliases' section, and add

        Nwidart\DbExporter\DbExportHandlerServiceProvider::class,

to providers section

finish

Code complete. Now execute

php artisan dbe:seeds
php artisan dbe:migrations

and you will get laravelTableSeeder.php and 20xx_xx_xx_xxxxx_create_laravel_database.php files in your project root directory.

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

4 participants