tsterker / laravel-flextable
Dynamically migrate and seed databases
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tsterker/laravel-flextable
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-27 04:50:42 UTC
README
use Tsterker\Flextable\Manager; $manager = new Manager($optionalConnection = 'custom'); $connection = $manager->getConnection(); $manager->migrate('/absolute/path/to/migrations'); $manager->seed(\Acme\DatabaseSeeder::class, $alternativeFactories = '/absolute/path/to/factories');
In case your Models have an explicit $connection
property set:
A). Specify the connection name during new Manager('custom-connection)
(:warning: it will be replaced in the configuration!)
B). Use the IsFlextable
trait on a base model that all relevant models inherit from.
use Tsterker\Flextable\IsFlextable; use Tsterker\Flextable\Manager; class BaseModel extends \Illuminate\Eloquent\Model { use IsFlextable; protected $connection = 'custom-connection'; }