Sindbad~EG File Manager
<?php
class GPController extends BaseController {
//http://stackoverflow.com/questions/26666375/login-trouble-in-laravel-4-2
//http://stackoverflow.com/questions/23134702/laravel-4-2-and-remember-me-update
//IC get
public function getGP($id){
if($id != null )
$id = intval(urldecode(Helper::decrypt($id)));
$gp = new GP();
if($id>0)
{
$gp = GP::find($id);
}
else {
return Redirect::to('gpbo/index');
}
return View::make('gpbo.view')
->with('gp',$gp);
}
public function index(){
$gps = GP::orderby('gp_no')->get();
return View::make('gpbo.index')
->with('gps',$gps);
}
//IC Store
public function update()
{
//form ajax all steps
$gp_id = intval(Input::get('hdnId'));
$gp = GP::find($gp_id);
$gp->summary_non_html = Input::get('txtsummary');
$gp->update_count = ($this->getMaxUpdateCount()) + 1;
$gp->save();
return Redirect::to('gpbo/index');
}
public function getMaxUpdateCount()
{
return GP::max('update_count');
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists