예제 #1
0
 /** @test **/
 public function it_fetches_the_field_of_the_component()
 {
     $this->createComponent('pages', function ($component) {
         $component->string('title');
     });
     $component = Component::byName('pages');
     $this->assertEquals('title', $component->field('title')->name);
 }
예제 #2
0
파일: Builder.php 프로젝트: typecms/core
 /**
  * Open a connection to the component.
  *
  * @param  string  $name
  * @return Component
  */
 private function openConnection(string $name)
 {
     return EloquentComponent::byName($name);
 }