From 44ea8bcf6ca479ad294493870e3004eac7e8743b Mon Sep 17 00:00:00 2001 From: shunmugam Date: Wed, 22 Jun 2022 22:46:54 +0530 Subject: [PATCH] seed fix --- src/Commands/Seed.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index 5f2760c..685fdac 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -80,10 +80,12 @@ public function handle() //print_r($files); foreach ($files as $file) { $class_name = preg_replace('/\..+$/', '', $file); + $m = ltrim($module, '/'); + $m = str_replace('/', '\\', $m); + $m = str_replace('local\\'.Cms::getCurrentTheme().'\\', '', $m); $this->call('db:seed', [ - '--class' => Cms::getPath() . '\\' . $module . '\\Database\\seeds\\' . $class_name + '--class' => $m . '\\Database\\seeds\\' . $class_name ]); - //echo 'hai'; } } }