Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to create singleton laravel

use AppServicesTransistor;
use AppServicesPodcastParser;
 
$this->app->singleton(Transistor::class, function ($app) {
    return new Transistor($app->make(PodcastParser::class));
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #create #singleton #laravel
ADD COMMENT
Topic
Name
2+6 =