| 1 | package Galileo::Plugin::Deploy; | ||
| 2 | |||
| 3 | use Mojo::Base 'Mojolicious::Plugin'; | ||
| 4 | |||
| 5 | use Galileo::DB::Deploy; | ||
| 6 | |||
| 7 | sub register { | ||
| 8 | my ($plugin, $app) = @_; | ||
| 9 | |||
| 10 | my $dh = Galileo::DB::Deploy->new( schema => $app->schema ); | ||
| 11 | $app->helper( dh => sub { $dh } ); | ||
| 12 | |||
| 13 | return $dh; | ||
| 14 | } | ||
| 15 | |||
| 16 | 1; | ||
| 17 |