I am working on a Laravel project which runs fine on my Virtual box ubuntu 14.04 on a Mac Platform. It is very difficult to keep up with changes as rsync files etc etc, so I decided to move the app into my Mac Platform.
When I do this i always get the following error:
{"error":{"type":"ErrorException","message":"The use statement with non-compound name 'DB' has no effect","file":"\/Users\/user\/data\/folder\/app\/controllers\/CampaignsController.php","line":3}}
My CampaignsController.php looks like this:
<?php
use \DB;
use \Auth;
use \Validator;
use \Event;
.......
If I comment them out the app starts running. The only problem is when i need to commit changes, i need to remove the commented out lines and the re-comment them out for the app to run.
Is there any other way to fix this issue and why would the app run fine in a linux environment but not under a Mac Os environment?