1. Go to this page and download the library: Download plopster/trace-code-maker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Plopster\TraceCodeMaker\TraceCodeMaker;
class TraceCodeMakerServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
$this->app->singleton('tracecodemaker', function ($app) {
return new TraceCodeMaker();
});
}
/**
* Bootstrap services.
*/
public function boot(): void
{
//
}
}
'providers' => [
// Other Service Providers
App\Providers\TraceCodeMakerServiceProvider::class,
],
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
class TraceCodeMaker extends Facade
{
protected static function getFacadeAccessor()
{
return 'tracecodemaker';
}
}
'aliases' => [
// Other Facades
'TraceCodeMaker' => App\Facades\TraceCodeMaker::class,
],