Route::get ( '/routepath/{param?}', [
'as' => 'routepath',
'uses' => 'MyAddController@myAdd'
] )->where('param', '[A-Za-z0-9_/-]+');
* param can contain value with slash
public function lockForUpdate()
{
\DB::transaction(function () {
$update = JasperReportParam::where('ID','=', 26262)->lockForUpdate()->first();
$update->ID = 26262;
$update->status = 'LOCK';
$update->save();
});
}
* The selected row will be locked from being selected or updated by other process. This will solve race condition issue in updating the same record.
public function postGetEvents1(){
// Get default limit
$normalTimeLimit = ini_get('max_execution_time');
// Set new limit
ini_set('max_execution_time', 600);
//other code
// Restore default limit
ini_set('max_execution_time', $normalTimeLimit);
return;
}