नीचे कोड यह सब कहते हैं करने के लिए मेकअप से डेटा पासिंग ...Laravel 4: सेवा प्रदाता
// routes.php
App::make('SimpleGeo',array('test')); <- passing array('test')
// SimpleGeoServiceProvider.php
public function register()
{
$this->app['SimpleGeo'] = $this->app->share(function($app)
{
return new SimpleGeo($what_goes_here);
});
}
// SimpleGeo.php
class SimpleGeo
{
protected $_test;
public function __construct($test) <- need array('test')
{
$this->_test = $test;
}
public function getTest()
{
return $this->_test;
}
}
हैलो @schmaltz आप अपने प्रश्न के लिए एक जवाब पर पहुँच गए हैं में यह परीक्षण कर सकते हैं? मुझे एक ही समस्या है और समाधान की तलाश है क्योंकि मेरा एप्लिकेशन आपके जैसे समान आर्किटेक्चर का उपयोग करता है .. – Omranic