本文整理汇总了PHP中Illuminate\Foundation\Inspiring类的典型用法代码示例。如果您正苦于以下问题:PHP Inspiring类的具体用法?PHP Inspiring怎么用?PHP Inspiring使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Inspiring类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: randomQuote
public function randomQuote()
{
try {
return Inspiring::quote();
} catch (\Exception $e) {
return $e->getMessage();
}
}
开发者ID:bss-taiphung,项目名称:bss_puppy,代码行数:8,代码来源:Inspire.php
示例2: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
$this->info('info message');
$this->comment('comment');
$this->question('question');
$this->error('error');
}
开发者ID:kirantcyquent,项目名称:LaravelOffenders,代码行数:13,代码来源:Inspire.php
示例3: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
$this->table(['Name', 'Nickname'], [['Joshua', 'Jay Rock', 'may Day'], ['Lindsay', 'Hapagagwi'], ['Bellariz', 'Bhola'], ['Raymond', 'Mondi']]);
$this->info("That's for sure. We all know J rock");
$question = 'Are you sure you know who rock?';
$choices = ['Joshua', 'Bradshaw', 'Matikinye'];
$this->choice($question, $choices);
}
开发者ID:jbmadking,项目名称:bottlestore,代码行数:14,代码来源:Inspire.php
示例4: queueTest
public function queueTest()
{
$Collection = \Illuminate\Support\Collection::make(['0 . ', '1 . ', '2 . ', '3 . ', '4 . ']);
foreach (range(0, 2) as $v) {
$message = \Illuminate\Foundation\Inspiring::quote();
$job = (new \App\Jobs\PushMessage(1, $Collection->get($v)))->delay(20 * $v);
\Bus::dispatch($job);
}
$job = (new \App\Jobs\PushMessage(1, $Collection->get(3), 1))->delay(20 * ($v + 1));
\Bus::dispatch($job);
}
开发者ID:guyunxiang32,项目名称:transfer,代码行数:11,代码来源:GeneralTestController.php
示例5: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
$auctions = Art::where('art.end_datetime', '<', Carbon::now())->where('art.processed', '0')->get();
// $test = $test;
foreach ($auctions as $art) {
$bids = $art->bids()->orderBy('price', 'DESC')->get();
// var_dump($bids);
if (count($bids)) {
$winner = $bids->first();
// var_dump($winner);
$allMails = [];
array_push($allMails, $winner->user->email);
$loserMails = [];
foreach ($bids as $bid) {
$email = $bid->user->email;
// echo $email;
if (!in_array($email, $allMails)) {
array_push($allMails, $email);
array_push($loserMails, $email);
}
}
$data = [];
$data['winner'] = $winner->user;
$data['auction-name'] = $art->title;
Mail::send('emails.auction-win', $data, function ($message) use($data) {
$message->to($data['winner']->email)->subject('U heeft de auction gewonnen');
});
foreach ($loserMails as $mail) {
$data['mail'] = $mail;
Mail::send('emails.auction-lose', $data, function ($message) use($data) {
$message->to($data['mail'])->subject('U heeft de auction niet gewonnen');
});
}
$art->sold = 1;
}
$art->processed = 1;
$art->save();
echo $art->title . "\n";
}
}
开发者ID:jeroenjvdb,项目名称:development-veiling,代码行数:46,代码来源:AuctionEnd.php
示例6: update
public function update(Request $request)
{
$result = 'Scheduled update.';
$payload = json_decode($request->getContent(), true);
switch ($request->header('x-github-event')) {
case 'push':
$this->dispatch(new UpdateProviders($payload['commits']));
break;
case 'pull_request':
if ($payload['action'] == 'closed' && $payload['merged']) {
$this->dispatch(new UpdateProviders($payload['commits']));
break;
}
$result = 'No merge happened. Nothing to do.';
break;
case 'ping':
default:
$result = Inspiring::quote();
break;
}
return response()->json(compact('result'));
}
开发者ID:wasgeht-berlin,项目名称:website,代码行数:22,代码来源:AppController.php
示例7: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$rootPath = $this->getRootPath();
$sourcePath = $this->getSourcePath();
// Start Copying Files
copy($sourcePath . 'aliases', $rootPath . 'aliases');
copy($sourcePath . 'Homestead.yaml', $rootPath . 'Homestead.yaml');
copy($sourcePath . 'Vagrantfile', $rootPath . 'Vagrantfile');
if (!file_exists($rootPath . 'scripts')) {
mkdir($rootPath . 'scripts');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'after.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'after.sh');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'blackfire.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'blackfire.sh');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'create-mysql.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'create-mysql.sh');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'create-postgres.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'create-postgres.sh');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'homestead.rb', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'homestead.rb');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'serve.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'serve.sh');
copy($sourcePath . 'scripts' . DIRECTORY_SEPARATOR . 'serve-hhvm.sh', $rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'serve-hhvm.sh');
$string = Inspiring::quote();
$pieces = explode(' ', $string);
$vbName = strtolower(array_pop($pieces));
if ($this->option('name')) {
$vbName = $this->option('name');
}
// Update virtualbox name
$file = file_get_contents($rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'homestead.rb');
$newFile = str_replace("vb.name = 'homestead'", "vb.name = '" . $vbName . "'", $file);
if ($this->option('hostname')) {
$hostName = $this->option('hostname');
$newFile = str_replace("settings[\"hostname\"] ||= \"homestead\"", "settings[\"hostname\"] ||= \"" . $hostName . "\"", $file);
}
file_put_contents($rootPath . 'scripts' . DIRECTORY_SEPARATOR . 'homestead.rb', $newFile);
} else {
$this->error('The scripts/ folder exists, please delete and run php artisan homeastead:create again.');
die;
}
$this->info('Files Copied');
$this->info('Ready to edit Homestead.yaml!');
}
开发者ID:fauzcs110,项目名称:HomesteadSkeleton,代码行数:43,代码来源:HomesteadCreateCommand.php
示例8: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
}
开发者ID:binalfew,项目名称:EthioShare,代码行数:9,代码来源:Inspire.php
示例9: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
\Log::info('This is some useful information.');
}
开发者ID:jerryamatya,项目名称:broadcaster,代码行数:10,代码来源:Inspire.php
示例10: function
<?php
use Illuminate\Foundation\Inspiring;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
});
开发者ID:nerea91,项目名称:laravel,代码行数:16,代码来源:console.php
示例11: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL . \Carbon\Carbon::now());
}
开发者ID:aminaminamin93,项目名称:pricescales,代码行数:9,代码来源:Inspire.php
示例12: handle
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(Inspiring::quote());
}
开发者ID:baconfy,项目名称:skeleton,代码行数:9,代码来源:Inspire.php
示例13: getQuote
public function getQuote()
{
return Inspiring::quote();
}
开发者ID:superpanda19,项目名称:laravel-angularjs-todo,代码行数:4,代码来源:ApiController.php
示例14: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
/* $a=new Inspiring ;*/
return view('welcome')->with('quote', Inspiring::quote());
}
开发者ID:Dreamerpro,项目名称:Cultstage1,代码行数:10,代码来源:WelcomeCtrl.php
注:本文中的Illuminate\Foundation\Inspiring类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论