i was learning laravel6 from scratch from laracast.com and when i started to use the database. I bumped into the following problem:
Illuminate\Database\QueryException could not find driver (SQL: select * from
posts
whereslug
= my-first-post limit 1)
I use wamp with phpmyadmin. I tried xamp and mySQL workbench. I updated my dependencies, but without result.
this is my controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PostsController extends Controller
{
public function show($slug)
{
$post = \DB::table('posts')->where('slug', $slug)->first();
if(! $post){
abort(404);
}
return view('post', [
'post' => $post
]);
}
}
Can somebody please help me with this problem?
Best regards, Jeff