mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Use ImageUploadRequest
This commit is contained in:
parent
023910472c
commit
a090b6a9d2
|
@ -144,7 +144,7 @@ class DepartmentsController extends Controller
|
||||||
return view('departments/edit', compact('item'));
|
return view('departments/edit', compact('item'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, $id) {
|
public function update(ImageUploadRequest $request, $id) {
|
||||||
|
|
||||||
$this->authorize('create', Department::class);
|
$this->authorize('create', Department::class);
|
||||||
if (is_null($department = Department::find($id))) {
|
if (is_null($department = Department::find($id))) {
|
||||||
|
|
|
@ -123,7 +123,7 @@ class ManufacturersController extends Controller
|
||||||
* @return \Illuminate\Http\RedirectResponse
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
* @since [v1.0]
|
* @since [v1.0]
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $manufacturerId = null)
|
public function update(ImageUploadRequest $request, $manufacturerId = null)
|
||||||
{
|
{
|
||||||
// Check if the manufacturer exists
|
// Check if the manufacturer exists
|
||||||
if (is_null($manufacturer = Manufacturer::find($manufacturerId))) {
|
if (is_null($manufacturer = Manufacturer::find($manufacturerId))) {
|
||||||
|
|
Loading…
Reference in a new issue