本文整理汇总了PHP中Storage::prepend方法的典型用法代码示例。如果您正苦于以下问题:PHP Storage::prepend方法的具体用法?PHP Storage::prepend怎么用?PHP Storage::prepend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Storage
的用法示例。
在下文中一共展示了Storage::prepend方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
/**
* @param $request
* @return mixed
* @throws CheckoutException
*/
public static function generate($request)
{
$data = $request;
$data['transaction'] = uniqid();
if (config('checkout.use_database') === true) {
/**
* @todo Add database support
*/
throw new CheckoutException('Database is not supported yet.');
} else {
\Storage::prepend(config('checkout.table_prefix') . 'Transactions', $data['transaction'] . '|.' . json_encode($data));
}
return $data;
}
示例2: handle
/**
* Execute the command.
*
* @return void
*/
public function handle()
{
parent::handle();
if (!$this->commandData->skipMigration) {
$migrationGenerator = new MigrationGenerator($this->commandData);
$migrationGenerator->generate();
}
$modelGenerator = new ModelGenerator($this->commandData);
$modelGenerator->generate();
\Storage::prepend('laravel.log', 'Model Generated');
$AdminModelGenerator = new AdminModelGenerator($this->commandData);
$AdminModelGenerator->generate();
$requestGenerator = new RequestGenerator($this->commandData);
$requestGenerator->generate();
$adminRequestGenerator = new AdminRequestGenerator($this->commandData);
$adminRequestGenerator->generate();
$repositoryGenerator = new RepositoryGenerator($this->commandData);
$repositoryGenerator->generate();
$adminRepositoryGenerator = new AdminRepositoryGenerator($this->commandData);
$adminRepositoryGenerator->generate();
$adminViewsGenerator = new AdminViewGenerator($this->commandData);
$adminViewsGenerator->generate();
$liveViewsGenerator = new LiveViewGenerator($this->commandData);
$liveViewsGenerator->generate();
$repoAdminControllerGenerator = new AdminControllerGenerator($this->commandData);
$repoAdminControllerGenerator->generate();
$repoControllerGenerator = new ViewControllerGenerator($this->commandData);
$repoControllerGenerator->generate();
$repoControllerGenerator = new APIControllerGenerator($this->commandData);
$repoControllerGenerator->generate();
$routeGenerator = new RoutesGenerator($this->commandData);
$routeGenerator->generate();
if ($this->confirm("\nDo you want to migrate database? [y|N]", false)) {
$this->call('migrate');
}
}