More works on products
This commit is contained in:
@@ -186,11 +186,11 @@ class AdminController extends Controller
|
||||
$validation = $request->validate([
|
||||
'name' => 'required|string|min:2|max:255',
|
||||
'active' => 'sometimes|accepted',
|
||||
'address1' => 'required|string|min:2|max:255',
|
||||
'address1' => 'nullable|string|min:2|max:255',
|
||||
'address2' => 'nullable|string|min:2|max:255',
|
||||
'city' => 'required|string|min:2|max:64',
|
||||
'state' => 'required|string|min:2|max:32',
|
||||
'postcode' => 'required|string|min:2|max:8',
|
||||
'city' => 'nullable|string|min:2|max:64',
|
||||
'state' => 'nullable|string|min:2|max:32',
|
||||
'postcode' => 'nullable|string|min:2|max:8',
|
||||
'supplier_details.notes' => 'nullable|string|min:3',
|
||||
'supplier_details.accounts' => 'nullable|email',
|
||||
'supplier_details.support' => 'nullable|email',
|
||||
|
@@ -207,7 +207,7 @@ class ServiceController extends Controller
|
||||
* @param Request $request
|
||||
* @param Service $o
|
||||
* @return RedirectResponse
|
||||
* @todo revalidate
|
||||
* @deprecated - use update()
|
||||
*/
|
||||
public function domain_edit(Request $request,Service $o)
|
||||
{
|
||||
@@ -254,4 +254,27 @@ class ServiceController extends Controller
|
||||
return view('r.service.domain.list')
|
||||
->with('o',$o);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update details about a service
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Service $o
|
||||
* @return RedirectResponse
|
||||
* @todo This needs to be reworked, to take into account our different service types
|
||||
* @todo Add Validation
|
||||
*/
|
||||
public function update(Request $request,Service $o)
|
||||
{
|
||||
if ($request->post($o->type->type)) {
|
||||
$o->type->forceFill($request->post($o->type->type))->save();
|
||||
}
|
||||
|
||||
if ($request->post('date_start'))
|
||||
$o->date_start = $request->post('date_start');
|
||||
|
||||
$o->save();
|
||||
|
||||
return redirect()->back()->with('success','Record Updated');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user