<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Response;
use App\VendorExtension\Symfony\Component\HttpFoundation\BinaryFileResponseExtension as BinaryFileResponseExtension ;
class ResponseMacroServiceProvider extends ServiceProvider
{
/**
* Register the application's response macros.
*
* @return void
*/
public function boot()
{
Response::macro('sendContent', function ($value) {
return Response::make(BinaryFileResponseExtension::sendContent());
});
Response::macro('deleteFileAfterSend', function ($value) {
return Response::make(BinaryFileResponseExtension::deleteFileAfterSend());
});
}
}