Hi,
Currently I'm working on the back-end system of my website and I've created a module where admins can insert/update data. I use different classes so the top of my file looks like:
namespace App\Http\Controllers;
use App\User;
use Input;
use Validator;
use View;
use Redirect;
class myAwesomeClassThatDoesStuff extends Controller {
// Stuff
}
It works fine but lots (practically all) my Controllers will have to 'use' these other classes. Is this the way because it seems kind of repetitive to me..
sven22, this is normal and not something you should really have to worry about. I use PHPStorm and let it add the use Class
to the class I am working in.
One thing I noticed is your class name, first letter should be capitalized. Ignore if it was a typo :P
Thank you for your reply :-) The classname was a typo, but thanks for pointing it out!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community