示例#1
0
 public function index($type = '')
 {
     foreach (ContentType::all() as $type) {
         $content = new ContentType($type->name);
         $content->createTable();
         $content->updateColumns();
     }
     // $content = new ContentType('missionary');
     // $content->createRecord(array('name' => 'John Lennon', 'slug' => 'john-lennon'));
     // $content = new ContentType('country');
     // $content->createRecord(array('name' => 'Germany', 'code' => 'de'));
     $this->content = View::auto();
 }
 public function index($type = '')
 {
     $this->content = View::auto();
     $contentType = new ContentType(singularize($type));
     $this->content->entries = $contentType->find();
 }