
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
- Validation for multiple forms on same page in laravel
- Multiple Level eager loading in Laravel
- Get Array of IDs from Eloquent Collection
- Declaration of App\Models\Post::sluggable() must be compatible with Cviebrock\EloquentSluggable\Sluggable
- How to create controller in laravel
- Update email with unique validation in laravel
- How to check record exist or not in relationship table
- How to create belongstomany relation using custom name on custom pivot table
- How to display user profile after login in laravel
- Insert Comma Separated Values in laravel
- If no route matched route::fallback in laravel
- How to run a specific seeder class in laravel
- Insert current date time in a column using Laravel
- Laravel get all records with pagination
- Calculate age from date of birth in Laravel
- OrderBy on Eloquent relationships method in Laravel
- How to check records exist in loaded relationship in Laravel blade view
- Add class to body in laravel view
- How to get last record from object collection in laravel
- Submit form without CSRF token in Laravel
- How to call model in blade laravel
- Datetime field in Laravel migration
- How to prevent host header attack in Laravel
- Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0"
- How to pass data to partial view file in laravel