当前位置: 首页>>代码示例>>PHP>>正文


PHP Block::all方法代码示例

本文整理汇总了PHP中Block::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Block::all方法的具体用法?PHP Block::all怎么用?PHP Block::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Block的用法示例。


在下文中一共展示了Block::all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getIndex

 public function getIndex()
 {
     $title = "Блоки";
     $desc = "обзор и управление Блоками";
     $blocks = \Block::all();
     return view('blocks::list')->withTitle($title)->withDesc($desc)->withBlocks($blocks);
 }
开发者ID:scrobot,项目名称:backend-blocks,代码行数:7,代码来源:BlockController.php

示例2: boot

 /**
  * Boot the service provider.
  * @return void
  */
 public function boot()
 {
     $this->loadViewsFrom(__DIR__ . '/../resources/views', 'blocks');
     $this->loadViewsFrom(blocks_path(), 'block');
     $this->mergeConfigFrom(realpath(__DIR__ . '/../config/config.php'), 'module');
     $this->publishes([__DIR__ . '/../public' => public_path('code_mirror')], 'public');
     pusher('sidebar', 'blocks::sidebar', [], 2);
     pusher('widgets', 'blocks::block_widget', ['blocks' => \Block::all()]);
     require __DIR__ . '/routes.php';
     require __DIR__ . '/blade.php';
 }
开发者ID:scrobot,项目名称:backend-blocks,代码行数:15,代码来源:BlocksServiceProvider.php

示例3: function

    $totalRewarded = $user->userMoney->ammount_won;
    $totalWithdrawn = $user->userMoney->ammount_withdrawn;
    $userMoneyAvailable = $totalAdded + $totalRewarded - ($totalInvested + $totalWithdrawn);
    $view->with('moneyAvailable', $userMoneyAvailable);
});
View::creator('includes.backend.cycles', function ($view) {
    $uid = Auth::user()->id;
    $lastInvest = Transaction::where('user_id', '=', $uid)->where('transaction_direction', '=', 'invested')->orderBy('id', 'DESC')->first();
    $amount = 0;
    if ($lastInvest) {
        $amount = $lastInvest->ammount;
    }
    $view->with('lastInvestedAmmount', $amount);
});
View::creator('homepage', function ($view) {
    $blocks = Block::all();
    // TODO: Improve this part. Add validation.
    foreach ($blocks as $block) {
        $block->content = json_decode($block->content);
    }
    $view->with('blocks', $blocks);
});
App::missing(function ($exception) {
    return Response::view('errors/404', array(), 404);
});
Route::get('rules', function () {
    return View::make('rules');
});
Route::get('news', function () {
    return View::make('news');
});
开发者ID:fencer-md,项目名称:stoticlle,代码行数:31,代码来源:routes.php

示例4: showBlocks

 public function showBlocks()
 {
     $blocks = Block::all();
     return View::make('backend.admin.config.blockslist')->with('blocks', $blocks);
 }
开发者ID:fencer-md,项目名称:stoticlle,代码行数:5,代码来源:ContentController.php


注:本文中的Block::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。