Laravel Capsule for buildung SQL queries

Code
<?php

use Illuminate\Database\Capsule\Manager;
use 
Illuminate\Container\Container;

$config = [
    
'driver' => 'mysql',
    
'host' => 'notlocalhost',
    
'database' => 'my_db',
    
'username' => 'notroot',
    
'password' => 'supersecret',
    
'collation' => 'utf8_unicode_ci',
];

$container = new Container();
$capsule = new Manager($container);

$capsule->addConnection($config'default');

// Working with Capsule

$result $capsule->getConnection()
    ->
table('test')
    ->
where('id''='3)
    ->
get();

dump($result);

// Set this Capsule instance as global instance
$capsule->setAsGlobal();

$result $capsule->table('test')
    ->
where('id''='1)
    ->
get();

dump($result);
Result
array:1 [
0 => {#381
+"id": 3
+"name": "bar"
+"creation_date": "2014-07-23 07:27:18"
}
]

array:1 [
0 => {#386
+"id": 1
+"name": "foo"
+"creation_date": "2014-07-20 11:37:29"
}
]
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6