Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel database connection check

use IlluminateSupportFacadesDB;

// Test database connection
try {
    DB::connection()->getPdo();
} catch (Exception $e) {
    die("Could not connect to the database.  Please check your configuration. error:" . $e );
}
Comment

laravel get db connection info

if(DB::connection()->getDatabaseName())
   {
     echo "conncted sucessfully to database ".DB::connection()->getDatabaseName();
   }
Comment

check which database connect laravel

DB::connection();
Comment

laravel db connection issue

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3308
DB_DATABASE=rentable
DB_USERNAME=root
DB_PASSWORD=
Comment

PREVIOUS NEXT
Code Example
Php :: woocommerce get all subscriptions by user id 
Php :: laravel 8 date format 
Php :: php password validation regex 
Php :: wordpress remove add new button 
Php :: php utf8_decode 
Php :: laravel sort collection 
Php :: laravel storage get file path 
Php :: php date format iso 
Php :: laravel change column 
Php :: php in javascript 
Php :: codeigniter order by random 
Php :: laravel log daily 
Php :: factory laravel tinker 
Php :: php get total amount of days in month 
Php :: php isset ternary operator 
Php :: server cmd php 
Php :: laravel route resources 
Php :: how to recover xampp deleted files 
Php :: laravel wherehas with condition 
Php :: wordpress query multiple post ids 
Php :: how to add property to an object in php 
Php :: twig filter line break 
Php :: pass javascriot value from one page to another 
Php :: date and time in php 
Php :: woocommerce bulk product delete 
Php :: In PackageManifest.php line 122: 
Php :: how to change date formate in php 
Php :: laravel elasticsearch migration in laravel 
Php :: eloquent whereraw 
Php :: how assign default value to laravel migration column 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =