I am new to Laravel and checking out some sample code.
In a controller I see this:
<?php
use Illuminate\Support\Facades\Input;
class RegistrationController extends \BaseController {
public function __construct()
{
$this->beforeFilter('guest');
}
Why do I have to use the "use Illuminate\Support\Facades\Input;" ?
Cant I just use eg Input::get(); like I do in my route file?
this controller is in global namespace. so you don't need to use
use Illuminate\Support\Facades\Input;
you can directly callInput::get('foo');
here you can write either,
use Input
or\Input::get('foo')
while calling.