03-21-2024, 11:05 PM (This post was last modified: 03-21-2024, 11:09 PM by luckmoshy.)
(03-21-2024, 08:43 AM)RedWd Wrote: Hi, i already use migration via cli, now i want to run php spark migrate --all via php controller. How can i do this? Thank you
maybe you can do something like this
PHP Code:
$this->migrate = \Config\Services::migrations()
private function runAllMaigrate (){ try { if($this->migrate){ $this->migrate->latest(); } } catch (\Throwable $e) { die('there is a critical issue on running migration '.$e->getMessage()); exit(); } }