本文整理匯總了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');
}
}