mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 17:07:33 -04:00 
			
		
		
		
	* Remove unnecessary save() on invoice * Update copyright * Working on Credit Repository * Implement credits as a paymentable entity * Add credit_id to transformer * fix rules for update payment * Fix random deleted_at keys in transformers * Fix for password_protect check
		
			
				
	
	
		
			78 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Invoice Ninja (https://invoiceninja.com)
 | |
|  *
 | |
|  * @link https://github.com/invoiceninja/invoiceninja source repository
 | |
|  *
 | |
|  * @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
 | |
|  *
 | |
|  * @license https://opensource.org/licenses/AAL
 | |
|  */
 | |
| 
 | |
| namespace App\Http\Controllers\Auth;
 | |
| 
 | |
| use App\Http\Controllers\Controller;
 | |
| use Illuminate\Foundation\Auth\ResetsPasswords;
 | |
| use Illuminate\Http\Request;
 | |
| use Illuminate\Support\Facades\Auth;
 | |
| use Illuminate\Support\Facades\Password;
 | |
| 
 | |
| class ContactResetPasswordController extends Controller
 | |
| {
 | |
|     /*
 | |
|     |--------------------------------------------------------------------------
 | |
|     | Password Reset Controller
 | |
|     |--------------------------------------------------------------------------
 | |
|     |
 | |
|     | This controller is responsible for handling password reset requests
 | |
|     | and uses a simple trait to include this behavior. You're free to
 | |
|     | explore this trait and override any methods you wish to tweak.
 | |
|     |
 | |
|     */
 | |
| 
 | |
|     use ResetsPasswords;
 | |
| 
 | |
|     /**
 | |
|      * Where to redirect users after resetting their password.
 | |
|      *
 | |
|      * @var string
 | |
|      */
 | |
|     protected $redirectTo = '/client/dashboard';
 | |
| 
 | |
|     /**
 | |
|      * Create a new controller instance.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function __construct()
 | |
|     {
 | |
|         $this->middleware('guest:contact');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Display the password reset view for the given token.
 | |
|      *
 | |
|      * If no token is present, display the link request form.
 | |
|      *
 | |
|      * @param  \Illuminate\Http\Request  $request
 | |
|      * @param  string|null  $token
 | |
|      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
 | |
|      */
 | |
|     public function showResetForm(Request $request, $token = null)
 | |
|     {
 | |
|         return view('portal.default.auth.passwords.reset')->with(
 | |
|             ['token' => $token, 'email' => $request->email]
 | |
|         );
 | |
|     }
 | |
| 
 | |
|     protected function guard()
 | |
|     {
 | |
|         return Auth::guard('contact');
 | |
|     }
 | |
| 
 | |
|     public function broker()
 | |
|     {
 | |
|         return Password::broker('contacts');
 | |
|     }
 | |
| }
 |