Im trying to run a very basic Laravel app on my localhost.
I have a simple postgre DB, which contains 3 data rows. I can query the items in razorSQL and get the results, so the DB is fine.
In phpStorm I start a web server using php -S localhost:8888 -t public
Web server starts fine. If I start the app I get the Laravel home screen.
Okay, then I change the home route to this. I get "Hello World" displayed.
Route::get('/', function(){
$data = "Hello World";
return $data;
});
But when I do this
Route::get('/', function(){
$data = \DB::table('posts')->get();
return $data;
});
I get...
Do phpStorm support PDO or is ther some plugin that I need?
UPDATE
Route::get('/', function(){
// $data = \DB::table('posts')->get();
$data = phpinfo();
return $data;
});
php.ini location
php.ini
So PDO is enabled in php.ini. This is what I dont get. And yes I am new to PHP.
here is the PDO snip from phpInfo()
- PS, yes I did restart wamp after the change. I just dont understand why pdo_pgsql
is not appearing/working
Its also active in the Dropdown php extensions