本文整理匯總了PHP中Illuminate\Html\FormBuilder::setSessionStore方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormBuilder::setSessionStore方法的具體用法?PHP FormBuilder::setSessionStore怎麽用?PHP FormBuilder::setSessionStore使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Html\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::setSessionStore方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: registerFormBuilder
/**
* Register the form builder instance.
*
* @return void
*/
protected function registerFormBuilder()
{
$this->app->bindShared('form', function ($app) {
$form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
return $form->setSessionStore($app['session.store']);
});
}
示例2: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->singleton('form', function ($app) {
$form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
return $form->setSessionStore($app['session.store']);
});
$this->app->singleton('html', function ($app) {
return new HtmlBuilder($app['url']);
});
}
示例3: registerFormIfHeeded
/**
* Add Laravel Form to container if not already set
*/
private function registerFormIfHeeded()
{
if (!$this->app->offsetExists('form')) {
$this->app->bindShared('form', function ($app) {
$form = new LaravelForm($app['html'], $app['url'], $app['session.store']->getToken());
return $form->setSessionStore($app['session.store']);
});
if (!$this->aliasExists('Form')) {
AliasLoader::getInstance()->alias('Form', 'Illuminate\\Html\\FormFacade');
}
}
}
示例4: setSessionStore
/**
* Set the session store implementation.
*
* @param \Illuminate\Session\Store $session
* @return $this
* @static
*/
public static function setSessionStore($session)
{
return \Illuminate\Html\FormBuilder::setSessionStore($session);
}