mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Use ImageUploadRequest $request on user profile update
This commit is contained in:
parent
a090b6a9d2
commit
4898dd8e23
|
@ -11,6 +11,7 @@ use App\Models\Setting;
|
|||
use Gate;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
|
||||
/**
|
||||
* This controller handles all actions related to User Profiles for
|
||||
|
@ -40,7 +41,7 @@ class ProfileController extends Controller
|
|||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function postIndex()
|
||||
public function postIndex(ImageUploadRequest $request)
|
||||
{
|
||||
|
||||
$user = Auth::user();
|
||||
|
|
|
@ -24,7 +24,8 @@ class ImageUploadRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'image' => 'mimes:png,gif,jpg,jpeg,svg|max:2000'
|
||||
'image' => 'mimes:png,gif,jpg,jpeg,svg|max:2000',
|
||||
'avatar' => 'mimes:png,gif,jpg,jpeg,svg|max:2000',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue