示例#1
0
 public function messages()
 {
     if ($this->hasMessages()) {
         $this->messages = Session::get('messages');
         return View::make(Platform::getPackageName() . '::page/messages')->with('items', $this->messages)->render();
     }
 }
示例#2
0
 public function load()
 {
     $items = Config::get(Platform::getPackageName() . '::navigation');
     foreach ($items as $slug => $url) {
         $this->item($slug, $url);
     }
 }
示例#3
0
 public function namespaced($key, $custom = false)
 {
     if ($custom) {
         return self::NS . '::' . $key;
     } else {
         return Platform::getPackageName() . '::' . $key;
     }
 }
示例#4
0
 public function __construct(Repository $source = null)
 {
     if (!isset($source)) {
         $driver = 'Spescina\\PlatformCore\\Repositories\\' . ucfirst(Config::get(Platform::getPackageName() . '::database.driver'));
         $source = new $driver();
     }
     $this->source = $source;
     $this->setTable($this->table);
 }
示例#5
0
 protected function doListing()
 {
     Page::toolbar()->add('add', array('action' => 'form', 'label' => 'add'));
     return View::make(Platform::getPackageName() . '::listing');
 }
示例#6
0
 private function paginate($query)
 {
     $paging = Config::get(Platform::getPackageName() . '::table.pagination');
     return $query->paginate($paging);
 }