This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dataProviderSt = new CActiveDataProvider('VehicleLogbookTbl', array( | |
'criteria'=>array( | |
'select'=>'t.vehId, SUM(t.finalReading - t.iniReading) AS TMilg', | |
'group'=>'project.id', | |
'condition'=>'t.vehId=10', | |
//'order'=>'create_time DESC', | |
'with'=>array('project'), | |
), | |
'pagination'=>false, | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a new Task | |
*/ | |
Route::post('/task', function (Request $request){ | |
$validator = Validator::make($request->all(), [ | |
'name' => 'required|max:255', | |
]); | |
if ($validator->fails()) { | |
return redirect('/') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- New Task Form --> | |
<form action="/task" method="POST" class="form-horizontal"> | |
{{ csrf_field() }} | |
<!-- Task Name --> | |
<div class="form-group"> | |
<label for="task" class="col-sm-3 control-label">Task</label> | |
<div class="col-sm-4"> | |
<input type="text" name="name" id="task-name" class="form-control"> |