php – How to check SQL server version in Laravel blade view-ThrowExceptions

Exception or error:

How to check SQL server versions in Laravel blade file. I want make file system info.
Now i have this:

<div>Laravel version:  {{ App::VERSION() }}</div>
<div>PHP version: @php echo phpversion(); @endphp</div>

and this give me a view:

Laravel version: 5.8.37

PHP version: 7.2.8
How to solve:

You can use RAW query :

$results = DB::select( DB::raw('SHOW VARIABLES LIKE "%version%"') );

You will find additional version details about your installed MySQL
software like innodb_version, protocol_version, version_ssl_library
and more.

enter image description here
Reference:

https://laracasts.com/discuss/channels/eloquent/how-to-get-mysql-version

Answer´╝Ü

Try this

<?php echo mysql_get_server_info(); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *