/** * 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]; } }
/** * 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); }