Skip to content

Instantly share code, notes, and snippets.

@dev-scripts
Created December 7, 2022 09:09
Show Gist options
  • Select an option

  • Save dev-scripts/25c501bdfa747f7e7ee3a8f3eef178a6 to your computer and use it in GitHub Desktop.

Select an option

Save dev-scripts/25c501bdfa747f7e7ee3a8f3eef178a6 to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use App\Calculator\Calculator;
use Illuminate\Support\ServiceProvider;
class CalculatorServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->bind('calculator', function($app) {
return new Calculator();
});
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment