I'm building out an app in Laravel 5 and I need to ensure that one of my tables will be able to perform FULLTEXT searches.
I'd like to detect the MySQL version number(ensuring it's at least 5.6.10 or above) so that I can switch the engine to MyISAM in my migration file for a given table, if that condition fails.
I can't seem to find any docs on how to access the MySQL server info using PDO, which is what Laravel uses out of the box.
Any help is appreciated.
Why not just run select version(); query, which will give you all-correct result no matter which API you are using?
echo $pdo->query('select version()')->fetchColumn();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With