Apply fixes from StyleCI (#351)
This commit is contained in:
parent
1c47b2ed55
commit
436ba814a9
2 changed files with 7 additions and 8 deletions
|
@ -102,7 +102,7 @@ class PackController extends Controller
|
||||||
Alert::success('Pack successfully created on the system.')->flash();
|
Alert::success('Pack successfully created on the system.')->flash();
|
||||||
|
|
||||||
return redirect()->route('admin.packs.view', $pack->id);
|
return redirect()->route('admin.packs.view', $pack->id);
|
||||||
} catch(DisplayValidationException $ex) {
|
} catch (DisplayValidationException $ex) {
|
||||||
return redirect()->route('admin.packs.new')->withErrors(json_decode($ex->getMessage()))->withInput();
|
return redirect()->route('admin.packs.new')->withErrors(json_decode($ex->getMessage()))->withInput();
|
||||||
} catch (DisplayException $ex) {
|
} catch (DisplayException $ex) {
|
||||||
Alert::danger($ex->getMessage())->flash();
|
Alert::danger($ex->getMessage())->flash();
|
||||||
|
@ -144,7 +144,7 @@ class PackController extends Controller
|
||||||
if ($request->input('action') !== 'delete') {
|
if ($request->input('action') !== 'delete') {
|
||||||
$pack = $repo->update($id, $request->intersect([
|
$pack = $repo->update($id, $request->intersect([
|
||||||
'name', 'description', 'version',
|
'name', 'description', 'version',
|
||||||
'option_id', 'selectable', 'visible', 'locked'
|
'option_id', 'selectable', 'visible', 'locked',
|
||||||
]));
|
]));
|
||||||
Alert::success('Pack successfully updated.')->flash();
|
Alert::success('Pack successfully updated.')->flash();
|
||||||
} else {
|
} else {
|
||||||
|
@ -153,7 +153,7 @@ class PackController extends Controller
|
||||||
|
|
||||||
return redirect()->route('admin.packs');
|
return redirect()->route('admin.packs');
|
||||||
}
|
}
|
||||||
} catch(DisplayValidationException $ex) {
|
} catch (DisplayValidationException $ex) {
|
||||||
return redirect()->route('admin.packs.view', $id)->withErrors(json_decode($ex->getMessage()));
|
return redirect()->route('admin.packs.view', $id)->withErrors(json_decode($ex->getMessage()));
|
||||||
} catch (DisplayException $ex) {
|
} catch (DisplayException $ex) {
|
||||||
Alert::danger($ex->getMessage())->flash();
|
Alert::danger($ex->getMessage())->flash();
|
||||||
|
@ -211,5 +211,4 @@ class PackController extends Controller
|
||||||
])->deleteFileAfterSend(true);
|
])->deleteFileAfterSend(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,10 @@ class ServiceVariable extends Model
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cast values to correct type.
|
* Cast values to correct type.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'option_id' => 'integer',
|
'option_id' => 'integer',
|
||||||
'user_viewable' => 'integer',
|
'user_viewable' => 'integer',
|
||||||
|
|
Loading…
Reference in a new issue