/**
  * Create a new schema blueprint.
  *
  * @param string  $table
  * @param Closure $callback
  */
 public function __construct(Connection $connection, $collection)
 {
     $this->connection = $connection;
     try {
         $this->collection = $connection->getCollection($collection);
     } catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
         $this->collection = ['type' => $collection];
     }
 }
Example #2
0
 /**
  * Create a new schema blueprint.
  *
  * @param  string   $table
  * @param  Closure  $callback
  */
 public function __construct(Connection $connection, $collection)
 {
     $this->connection = $connection;
     $this->collection = $connection->getCollection($collection);
 }