Illuminate\Database\Connection::table PHP Method

table() public method

Begin a fluent query against a database table.
public table ( string $table ) : Builder
$table string
return Illuminate\Database\Query\Builder
    public function table($table)
    {
        return $this->query()->from($table);
    }

Usage Example

 /**
  * @param EventStreamInterface $eventStream
  * @return void
  * @throws SerializationException
  */
 public function append(EventStreamInterface $eventStream)
 {
     $events = collect(iterator_to_array($eventStream))->map(function ($event) {
         /** @var EventInterface $event */
         return ['aggregate_root_id' => (string) $event->getAggregateRootId(), 'type' => get_class($event), 'payload' => $this->serializer->serialize($event)];
     });
     $this->db->table('events')->insert($events->toArray());
 }
All Usage Examples Of Illuminate\Database\Connection::table