Skip to content

Instantly share code, notes, and snippets.

@nahidulhasan
Last active October 12, 2018 04:16
Show Gist options
  • Save nahidulhasan/62ae91226a57ffd4cbe8b6d1b230b61d to your computer and use it in GitHub Desktop.
Save nahidulhasan/62ae91226a57ffd4cbe8b6d1b230b61d to your computer and use it in GitHub Desktop.
MacrosServiceProvider
<?php
namespace App\Providers;
use App\Services\Macros;
use Collective\Html\HtmlServiceProvider;
/**
* Class MacroServiceProvider
* @package App\Providers
*/
class MacroServiceProvider extends HtmlServiceProvider
{
public function register()
{
parent::register();
$this->app->singleton('form', function ($app) {
$form = new Macros($app['html'], $app['url'], $app['view'], $app['session.store']->token());
return $form->setSessionStore($app['session.store']);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment