@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | 5 | use App\Customer; |
| 6 | -use Illuminate\Http\Request; |
|
| 7 | - |
|
| 8 | 6 | use App\Http\Requests; |
| 9 | 7 | |
| 10 | 8 | class CustomersController extends Controller |
@@ -29,13 +29,13 @@ discard block |
||
| 29 | 29 | public function updateProfile(Requests\ProfileValidator $input) |
| 30 | 30 | { |
| 31 | 31 | // User information |
| 32 | - User::find(auth()->user()->id)->update($input->except(['_token', 'avatar'])); |
|
| 32 | + User::find(auth()->user()->id)->update($input->except([ '_token', 'avatar' ])); |
|
| 33 | 33 | |
| 34 | 34 | // User image information. |
| 35 | 35 | if (Input::file()) { |
| 36 | 36 | $image = Input::file('avatar'); |
| 37 | - $filename = time() . '.' . $image->getClientOriginalExtension(); |
|
| 38 | - $path = public_path('profilepics/' . $filename); |
|
| 37 | + $filename = time().'.'.$image->getClientOriginalExtension(); |
|
| 38 | + $path = public_path('profilepics/'.$filename); |
|
| 39 | 39 | |
| 40 | 40 | Image::make($image->getRealPath())->resize(80, 80)->save($path); |
| 41 | 41 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function updateSecurity(Requests\PasswordValidation $input) |
| 58 | 58 | { |
| 59 | - $data['password'] = bcrypt($input->password); |
|
| 59 | + $data[ 'password' ] = bcrypt($input->password); |
|
| 60 | 60 | |
| 61 | 61 | User::find(auth()->user()->id)->update($data); |
| 62 | 62 | session()->flash('message', 'Your password has been updated.'); |
@@ -26,6 +26,6 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function rules() |
| 28 | 28 | { |
| 29 | - return ['password' => 'required|min:6|confirmed']; |
|
| 29 | + return [ 'password' => 'required|min:6|confirmed' ]; |
|
| 30 | 30 | } |
| 31 | 31 | } |