title: Running laravel illuminate database transactions outside of laravel
body: <pre><code>require dirname(dirname(__DIR__)) . '/vendor/autoload.php';
  require dirname(__DIR__) . '/config.php';
  
  use Illuminate\Database\Capsule\Manager as DB;
  
  $dbc = new DB;
  
  $dbc-&gt;addConnection(array(
      'driver'    =&gt; 'mysql',
      'host'      =&gt; 'localhost',
      'database'  =&gt; DB_NAME,
      'username'  =&gt; DB_USER,
      'password'  =&gt; DB_PASSWORD,
      'charset'   =&gt; 'utf8',
      'collation' =&gt; 'utf8_unicode_ci',
      'prefix'    =&gt; ''
  ));
  
  $dbc-&gt;setAsGlobal();
  $dbc-&gt;bootEloquent();
  </code></pre>
  
  <p>$dbc->beginTransaction();</p>
  
  <p>Gives me this error,</p>
  
  <pre><code>PHP Fatal error:  Call to undefined method Illuminate\\Database\\Capsule\\Manager::beginTransaction()
  </code></pre>
  
  <p>Can anyone provide me with some help as to how to use capsule and database transactions outside of laravel. I can't find anything that would suggest this doesnt work?</p>