You need to import the class DB into your file.
You can do this by putting the following at the top under the first "Use"
use Illuminate\Support\Facades\DB;
That should do the trick.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community