mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Updated Shared controller and create & edit views
Updated Shared controller and create & edit views Uses the resource id now No passing hidden input id Uses alert component for response
This commit is contained in:
parent
724b7536a7
commit
d79c571505
@ -147,18 +147,18 @@ class SharedController extends Controller
|
||||
]);
|
||||
|
||||
$pricing = new Pricing();
|
||||
$pricing->updatePricing($request->id, $request->currency, $request->price, $request->payment_term, $request->next_due_date);
|
||||
$pricing->updatePricing($shared->id, $request->currency, $request->price, $request->payment_term, $request->next_due_date);
|
||||
|
||||
Labels::deleteLabelsAssignedTo($request->id);
|
||||
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $request->id);
|
||||
Cache::forget("labels_for_service.{$request->id}");
|
||||
Labels::deleteLabelsAssignedTo($shared->id);
|
||||
Labels::insertLabelsAssigned([$request->label1, $request->label2, $request->label3, $request->label4], $shared->id);
|
||||
Cache::forget("labels_for_service.{$shared->id}");
|
||||
|
||||
IPs::deleteIPsAssignedTo($request->id);
|
||||
IPs::deleteIPsAssignedTo($shared->id);
|
||||
if (isset($request->dedicated_ip)) {
|
||||
IPs::insertIP($request->id, $request->dedicated_ip);
|
||||
IPs::insertIP($shared->id, $request->dedicated_ip);
|
||||
}
|
||||
|
||||
Cache::forget("shared_hosting.{$request->id}");
|
||||
Cache::forget("shared_hosting.{$shared->id}");
|
||||
Cache::forget('all_shared');
|
||||
Home::homePageCacheForget();
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
<x-text-input title="Domain" name="domain" value="{{$shared->main_domain}}"></x-text-input>
|
||||
</div>
|
||||
<div class="col-12 col-lg-3 mb-4">
|
||||
<input type="hidden" name="id" value="{{$shared->id}}">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend"><span class="input-group-text">Type</span></div>
|
||||
<select class="form-control" id="shared_type" name="shared_type">
|
||||
|
@ -12,11 +12,7 @@
|
||||
<div class="card shadow mt-3">
|
||||
<div class="card-body">
|
||||
<a href="{{ route('shared.create') }}" class="btn btn-primary mb-3">Add shared hosting</a>
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
<p class="my-1">{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<x-response-alerts></x-response-alerts>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead class="table-light">
|
||||
|
Loading…
Reference in New Issue
Block a user