mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed Companies and Categories uploads
This commit is contained in:
parent
b97ff4e907
commit
041fc20955
|
@ -76,8 +76,7 @@ class CategoriesController extends Controller
|
|||
$category->checkin_email = $request->input('checkin_email', '0');
|
||||
$category->user_id = Auth::id();
|
||||
|
||||
$category = $request->handleImages($category,600, public_path().'/uploads/categories');
|
||||
|
||||
$category = $request->handleImages($category);
|
||||
if ($category->save()) {
|
||||
return redirect()->route('categories.index')->with('success', trans('admin/categories/message.create.success'));
|
||||
}
|
||||
|
@ -136,7 +135,7 @@ class CategoriesController extends Controller
|
|||
$category->checkin_email = $request->input('checkin_email', '0');
|
||||
|
||||
|
||||
$category = $request->handleImages($category,600, public_path().'/uploads/categories');
|
||||
$category = $request->handleImages($category);
|
||||
|
||||
if ($category->save()) {
|
||||
// Redirect to the new category page
|
||||
|
|
|
@ -62,7 +62,7 @@ final class CompaniesController extends Controller
|
|||
$company = new Company;
|
||||
$company->name = $request->input('name');
|
||||
|
||||
$company = $request->handleImages($company,600, public_path().'/uploads/companies');
|
||||
$company = $request->handleImages($company);
|
||||
|
||||
if ($company->save()) {
|
||||
return redirect()->route('companies.index')
|
||||
|
@ -114,7 +114,7 @@ final class CompaniesController extends Controller
|
|||
$company->name = $request->input('name');
|
||||
|
||||
|
||||
$company = $request->handleImages($company,600, public_path().'/uploads/companies');
|
||||
$company = $request->handleImages($company);
|
||||
|
||||
|
||||
if ($company->save()) {
|
||||
|
|
Loading…
Reference in a new issue