File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,17 +8,15 @@ class MandrillServiceProvider extends ServiceProvider
88{
99 protected $ defer = false ;
1010
11- public function boot ()
11+ public function register ()
1212 {
1313 $ this ->package ('jlinn/mandrill-api-php ' );
14- }
1514
16- public function register ()
17- {
18- $ this ->app ->bind ('mandrill ' , function ()
15+ $ this ->app ['mandrill ' ] = $ this ->app ->share (function ($ app )
1916 {
20- $ config = $ this ->app ->config ->get ('mandrill-api-php::config ' );
21- return new MandrillFactory ($ config ['secret ' ]);
17+ $ config = $ app ->config ->get ('mandrill-api-php::config ' );
18+ $ factory = "\\{$ config ['factory ' ]}" ;
19+ return new $ factory ($ config ['secret ' ]);
2220 });
2321 }
2422
Original file line number Diff line number Diff line change 1010 | Change 'changeme' with your Mandrill Secret Key.
1111 |
1212 */
13- 'secret ' => 'changeme '
13+ 'secret ' => 'changeme ' ,
14+
15+ /*
16+ |--------------------------------------------------------------------------
17+ | Custom Factory Class
18+ |--------------------------------------------------------------------------
19+ |
20+ | If you wish to have a custom factory class to enhance the functionality of the library, feel free to override it.
21+ |
22+ */
23+ 'factory ' => 'Jlinn\Mandrill\MandrillFactory '
1424
1525);
You can’t perform that action at this time.
0 commit comments