Support the ongoing development of Laravel.io →
Packages Testing

Hi!

I'm trying to upgrade my packages to Laravel 5 but I'm finding an error with the Service Provider. I'm following the documentation (which I'm afraid it's not updated) and I don't know how to register a package into the system.

In Laravel 4 I just call the package function inside the boot function like this:

public function boot()
{
    $this->package('mcamara/package1');
}

but using Laravel 5 I find this error like this:

Call to undefined method [package]

I've checked the ServiceProvider class code I cannot find any function to register the package into the system. Can anybody help me with this?

Thanks for your help!! :)

PS: I also want to know how to enable filters (or Middleware) in testing? In Laravel 4 I used: $app['router']->enableFilters(); but it's not working neither and I cannot find any similar function to do so.

Last updated 3 years ago.
0

Check out this package: (https://github.com/caffeinated/modules) It works with a L5 from a day or 2 ago.

0

Thanks, that package helped me a lot!

0

Sorry that it was just a link!

Glad that it helped :)

0

@mcamara, did you ever figure out how to enable route filters in L5? I've been searching and searching but to no avail.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

mcamara mcamara Joined 2 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.