php 7 - laravel DB::connection()->getPdo()::PARAM_STR not working -


the function getpdo() param_str in laravel

db::connection()->getpdo()::param_str 

is working fine php 7.0.0 not working php 5.6.16 or lesser versions. how can param_str pdo instance in laravel php 5.6.16 or less?

i have tried

db::connection()->getpdo()->param_str 

but not working me..

the solution worked me this..

static function db ()     {         try {             $db = db::connection()->getpdo();         }         catch (pdoexception $e) {             self::fatal(                 "an error occurred while connecting database. ".                 "the error reported server was: ".$e->getmessage()             );         }         return $db;     } 

by calling..

$db=self::db();  $db::param_str 

i got solved. inside class & method


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -