Comments (2)
Use the "boot" method instead of register.
On Jan 13, 2013, at 8:27 AM, Raf [email protected] wrote:
I have created a basic workbench package and I am trying to inject Auth class instance to the main class of the package. It seems some of the components like Auth, Log, are not available inside the register method when using $this->app['auth'] or $this->app['log'].
It seems they are not loaded when the register method is called on service provider of workbench package.
I am getting the following errors
ReflectionException: Class auth does not exist
ReflectionException: Class log does not existThis is the Service Provider Class I am using
package('hbt/acl'); } /** * Register the service provider. * * @return void */ public function register() { $log = $this->app['log']; $auth = $this->app['auth']; $this->app['acl'] = new Acl($auth , $log); } ``` .... — Reply to this email directly or view it on GitHub.
from framework.
Thanks, this works inside the boot method.
from framework.
Related Issues (20)
- Redis interactions silently fail if using the same connection as a currently subscribed client HOT 1
- Unexpected DateTime Format in assertDatabaseHas Method with Date HOT 1
- Incorrect information in the comment block for the function Str::orderedUuid() HOT 1
- Different getPrefix() behavior for cached and non-cached routes HOT 7
- SQLite `whereJsonContains` grammar not working correctly HOT 8
- Max file size rule is lost if `types` used after HOT 2
- Null exception when sending a mail defining envelope without `from` HOT 3
- eloquent created event fired too early HOT 1
- Eloquent's `ArrayObject` breaks default behavior of json encoding HOT 1
- Docs Command can not be cancelled when offline HOT 6
- New Observe Attribute work has broken my model HOT 2
- whereHas, withWhereHas doesn't work properly with "withAvg.... " methods. HOT 2
- whereHas, withWhereHas doesn't work properly with "withAvg.... " methods. HOT 4
- 'array' validation rule passes when the value is an empty string and required_array_keys passes as long as at least 1 key exists HOT 1
- Error in observe function of HasEvent trait due to model dependency handling in Laravel 10.44.0 HOT 1
- [v11] Spark middleware does not exist HOT 4
- page expired when login HOT 1
- Incorrect behaviour "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification." HOT 3
- Sessions table is created even though driver is set to redis HOT 8
- My subdomain only index page works but others all page not works error 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.