Laravel Operations
composer create-project --prefer-dist laravel/laravel blog
Add the following lines in the require section of composer.json
"laravelcollective/html": "5.*"
Run composer update
$ composer update
Add provider to providers array in config/app.php
'Collective\Html\HtmlServiceProvider::class'
Add form alias to aliases array in config/app.php
'Form' => Collective\Html\FormFacade::class,'Html' => Collective\Html\HtmlFacade::class
$file = Request::file('filefield');
$extension = $file->getClientOriginalExtension();
$newFileName = 'xyz';
$path = $file->storeAs('/',$newFileName.'.'.$extension, 'private');
return $path;
Storage::disk('private')->exists($fileName)
Storage::disk('private')->delete($fileName)
\DB::enableQueryLog();
# query....
$queries = \DB::getQueryLog();
$last_query = end($queries);
var_dump($last_query);
exit;
->orWhere(function($query) use ($anotherStarttime,$anotherEndtime){
$query->where('starttime', '>=', $anotherStarttime);
$query->where('endtime', '<=', $anotherEndtime);
})
$someVariable = Input::get("some_variable");
$results = DB::select( DB::raw("SELECT * FROM some_table WHERE some_col = :somevariable"), array(
'somevariable' => $someVariable,
));