예제 #1
0
파일: Dashboard.php 프로젝트: dinghua/crm
 /**
  * Handle pane for dashboard page.
  *
  * @return void
  */
 public function compose()
 {
     $pane = $this->widget->make('pane.orchestra');
     $posts = Content::post()->publish()->latest(10)->get();
     if ($posts->isEmpty()) {
         return;
     }
     $pane->add('story-latest-posts')->attributes(['class' => 'six columns widget'])->title('Latest Post')->content(view('orchestra/story::widgets.latest-posts')->with('posts', $posts));
 }
예제 #2
0
 /**
  * Get widget services by type.
  *
  * @param  string  $type
  *
  * @return \Orchestra\Widget\Handler
  */
 public function widget($type)
 {
     return $this->widget->make("{$type}.orchestra");
 }
예제 #3
0
 /**
  * View dashboard.
  *
  * @param  \Orchestra\Contracts\Foundation\Listener\Account\ProfileDashboard  $listener
  *
  * @return mixed
  */
 public function show(Listener $listener)
 {
     $panes = $this->widget->make('pane.orchestra');
     return $listener->showDashboard(['panes' => $panes]);
 }