
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 add active class to menu item in laravel
- How to get specific columns using Laravel eloquent methods
- Laravel save object to database
- OrderBy on Eloquent relationships method in Laravel
- How to add a key value pair to existing array in laravel
- How to get route name on visit URL in laravel
- Laravel recursive function in controller
- How to display validation error in laravel
- How to Run CRON Job on LIVE SERVER on Cpanel in Laravel Project
- Automatically remove records using Prunable trait in Laravel
- Laravel insert query not working
- Extract only time from datetime in laravel
- How to customize pagination view in laravel
- How to add class to tr in table using foreach in laravel
- How to insert dynamic values to additional column with pivot column in pivot table on multiple records
- How to get specific columns using with method in laravel Eloquent relationship
- Update last created record in Laravel
- Call to a member function getRelationExistenceQuery() on array in Laravel
- Laravel create multiple records in Pivot table
- How to automatically update the timestamp of parent model in Laravel
- Get 30 days older records from table in laravel
- Redirect to another view from controller in laravel
- FirstOrCreate() Not Inserting Model
- How to fill a column automatically while creating records in Laravel
- If condition in foreach loop in laravel