app/Providers/LikeServiceProvider.php
/**
     * Register the application services.
     *
     * @return void
     */
Register the application services.
@return void
Register the application services . @return void
public function register()
    {
        $this->app->singleton(LikeService::class, function($app){
            return new LikeService();
        });
    }
public function register ( ) { $ this -> app -> singleton ( LikeService :: class , function ( $ app ) { return new LikeService ( ) ; } ) ; }
Register the application services.
Register the application services .