Skip to content

Commit

Permalink
Issue #178 - Add a temporary short documentation related to the Larav…
Browse files Browse the repository at this point in the history
…el support
  • Loading branch information
Lonnytunes committed Feb 28, 2025
1 parent 80c1794 commit 0d8814e
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions docs/content/getting-started/flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Some specific explanation, illustrated with some code:

Or juste a specific <span db-tools-flavor="standalone-symfony-docker-laravel">`command line`</span> in a paragraph.


## Standalone

First and foremost, *DbToolsBundle* is a PHP library. It can easily be used on any project managed
Expand All @@ -38,7 +37,7 @@ to find the database(s) you want to manage.

## Symfony

*DbToolsBundle* was, in its first version, a tools for *Symfony* developers only. The library can still
*DbToolsBundle* was, in its first version, a tool for *Symfony* developers only. The library can still
be fully integrated into any Symfony project via its dedicated bridge.

Right after you installed the bundle, and with zero configuration:
Expand All @@ -52,10 +51,43 @@ Right after you installed the bundle, and with zero configuration:

*DbToolsBundle* can be used in any CI/CD using its [*Docker* image](https://hub.docker.com/r/makinacorpus/dbtoolsbundle).

This image is based on [FrankenPHP](https://frankenphp.dev/docs/docker/). Every *DbtoolsBundle* commands can be run with `docker container run` utility.
This image is based on [FrankenPHP](https://frankenphp.dev/docs/docker/). Every *DbToolsBundle* commands can be run with `docker container run` utility.

All configuration can be set up mounting a config file (see [installation section](/getting-started/installation) for an example). This config file uses the exact same syntax as for the standalone flavor.

## Laravel (experimental) {#laravel}

WIP
With the arrival of its version 2, *DbToolsBundle* opens up to the world of
*Laravel*.

For now, the documentation does not include any specific example or precision
related to *Laravel*. However, the configuration of *DbToolsBundle* in *Laravel*
is very similar to its configuration in a *Symfony* project which would use YAML
files for that purpose, except that you will use PHP files instead.

To get *DbToolsBundle* running:

- add it to your *Laravel* project with [composer](https://getcomposer.org):
```sh
composer require makinacorpus/db-tools-bundle
```
- only if you disabled the [package discovery][1] system, manually register the
*DbToolsBundle* service provider in your `bootstrap/providers.php` file:
```php
return [
// ...
MakinaCorpus\DbToolsBundle\Bridge\Laravel\DbToolsServiceProvider::class,
// ...
];
```
- run the command `php artisan vendor:publish` to initialize the configuration
file `config/db-tools.php`,
- configure the package to your needs.

The configuration file is quite well self-documented, you should not be lost
in configuring the package.

If necessary, get help from the *Symfony* documentation by following the YAML
format examples.

[1]: https://laravel.com/docs/12.x/packages#package-discovery

0 comments on commit 0d8814e

Please sign in to comment.