Пример #1
0
 /** @test **/
 public function it_fetches_the_attribute_of_the_entity()
 {
     $this->createPostsTable();
     $entity = Entity::byName('posts');
     $attribute = $entity->attribute('title');
     $this->assertEquals('title', $attribute->name);
 }
Пример #2
0
 /**
  * Open a connection to the entity.
  *
  * @param  string  $table
  * @return Entity
  */
 private function openConnection(string $table)
 {
     return Entity::byName($table);
 }