Using namespaces in Laravel 4
Namespacing is pretty easy once you get that hang of it. Take the following example: app/models/File.php namespace App\Models; class File { public function someMethodThatGetsFiles() { } } app/controllers/FileController.php namespace App\Controllers; use App\Models\File; class FileController { public function someMethod() { $file = new File(); } } Declare the Namespace: namespace App\Controllers; Remember, once you’ve put a … Read more