Download the PHP package vicgutt/laravel-inspect-db without Composer

On this page you can find all versions of the php package vicgutt/laravel-inspect-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-inspect-db

Inspect and retrieve information about a given database

GitHub Tests Action Status GitHub PHPStan Action Status GitHub Code Style Action Status Latest Version on Packagist Total Downloads


This package allows you to inspect and retrieve information about your databases. This package has been tested against Sqlite, MySQL and PostgreSQL although others might work as well, if not, let's discuss it.

Here's a quick example:

Installation

You can install the package via composer:

You can publish the config file with:

You can check out what the contents of the published config file will be here: config/inspect-db.php

Inspect

The VicGutt\InspectDb\Inspect class is the main entry point of the package. It allows you to retrieve information about tables, a table's columns, it's indexes and foreign keys.

Retrieving the tables of a given database connection

Here, as no database connection was specified, the default configured database connection will be used.

Retrieving a particular table for a given database connection

Here, as no database connection was specified as second argument, the default configured database connection will be used.

Retrieving the columns of a particular table for a given database connection

Here, as no database connection was specified as second argument, the default configured database connection will be used.

Retrieving the indexes of a particular table for a given database connection

Here, as no database connection was specified as second argument, the default configured database connection will be used.

Retrieving the foreign keys of a particular table for a given database connection

Here, as no database connection was specified as second argument, the default configured database connection will be used.

Retrieving a particular column of a particular table for a given database connection

Here, as no database connection was specified as third argument, the default configured database connection will be used.

Retrieving a particular index of a particular table for a given database connection

Here, as no database connection was specified as third argument, the default configured database connection will be used.

Retrieving a particular foreign key of a particular table for a given database connection

Here, as no database connection was specified as third argument, the default configured database connection will be used.

Collections

The collections provided by this package all extend the abstract VicGutt\InspectDb\Collections\Entities\EntityCollection class which itself extends from the default Laravel collection (Illuminate\Support\Collection).

The available collections are:

The above collections differ slightly from the default Laravel collection and behavior you might be used to. That is, our collections internal items can only ever be an array of the entities they represent. As an example, the TableCollection items can only ever be an array of Tables.

In usage, this translates to type errors being thrown when some collection methods are used:

The solution to this is to convert our Collection into a default Laravel collection prior to calling methods which returns new instances of the current collection but with mutated items:

This behavior, although admittedly surprising, helps guarantee a collection of Xs only ever actually contains Xs.

Entities

Entities are meant to represent units present in a given database.

The available entities are:

Click on any of the listed entities above to learn more about the exposed properties and methods.


Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you're interested in contributing to the project, please read our contributing docs before submitting a pull request.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-inspect-db with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/dbal Version ^3.4
illuminate/contracts Version ^10.0
spatie/laravel-package-tools Version ^1.9.2
vicgutt/php-enhanced-enum Version ^0.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vicgutt/laravel-inspect-db contains the following files

Loading the files please wait ....