The use statement with non-compound name 'DB' has no effect
Created at 24-Sep-2021 ,
By samar
I have found error The use statement with non-compound name 'DB' has no effect in Laravel. To remove the error we have to just remove the use DB; statement from routes\web.php file
-
Remove use DB; statement from routes\web.php
//Remove below code from route\web.php use DB;
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- How to get tomorrow and yesterday date in laravel
- Validation errors for multiple forms on same page Laravel
- Method chaining in Laravel
- Class 'App\Http\Controllers\User' not found
- Import/Use Storage facade in laravel
- How to validate URL with https using regex in laravel
- Order by multiple columns in Laravel
- Get the post details if it has at least one comment in comments table
- How to display 1 day ago in comments in laravel view
- Add class to body in laravel view
- How to get records in random order in laravel
- Laravel change date format
- Argument 1 passed to App\Http\Controllers\Auth\LoginController::authenticated() must be an instance of App\Http\Controllers\Auth\Request
- Delete file from amazon s3 bucket using Laravel
- Call to a member function getRelationExistenceQuery() on array in Laravel
- RuntimeException You must enable the openssl extension in your php.ini to load information from https://repo.packagist.org
- Session Doesn't Work on Redirect
- Root composer.json requires php ^7.3 but your php version (8.0.0) does not satisfy that requirement
- Argument 1 passed to Symfony\Component\HttpFoundation\Response::setContent() must be of the type string or null, object given
- Include External CSS and JS file in Laravel
- Send OTP using textlocal api in laravel
- The openssl extension is required for SSL/TLS protection but is not available
- How to check find method executed successfully in laravel
- How to upload multiple images after preview in laravel using cropper js
- How to fetch single row data from database in laravel