Skip to content

Instantly share code, notes, and snippets.

@elishaukpong
Created January 2, 2023 11:42
Show Gist options
  • Save elishaukpong/25149ec1c5ca34c8741e447a24968202 to your computer and use it in GitHub Desktop.
Save elishaukpong/25149ec1c5ca34c8741e447a24968202 to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use App\Services\Compliment;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
// the first argument to the bind method,
// must match the return string of the facades
// getFacadeAccessor method
$this->app->bind('compliment', fn() => new Compliment());
}
/**
* 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