Support the ongoing development of Laravel.io →
posted 9 years ago
IOC
Last updated 2 years ago.
0

@kjones1876, you should know difference between Laravel Container and global class..

This line resolvers '\App\Plivo' instance in laravel app(the container).

$this->app->make('\App\Plivo');

And also this line just creates new object from class if it is defined..


 $value = new \App\Plivo; // This throws a not found error
Last updated 9 years ago.
0

@muratodunc I have apparently greatly miss understood how im meant to using containers. Thanks.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

kjones1876 kjones1876 Joined 19 Nov 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.

© 2024 Laravel.io - All rights reserved.