简体   繁体   English

Laravel 5.7类App \\ Http \\ Controllers \\ Auth \\ SendsPasswordResetEmails不存在

[英]Laravel 5.7 Class App\Http\Controllers\Auth\SendsPasswordResetEmails does not exist

I'm trying to implement the reset password function using the built-in function from Laravel 5.7 as i have defined my routes in my web.php . 我正在尝试使用Laravel 5.7中的内置函数来实现重置密码功能,因为我已经在web.php定义了路由。 I tried running php artisan route:list , It gave me an exception 我尝试运行php artisan route:list ,这给了我一个例外

UPDATE UPDATE

Sorry for the lack of information given. 抱歉,缺少给出的信息。 I have already ran the command php artisan make:auth previously and the Auth::routes() has already been defined in web.php I am trying to access function resets in ResetPasswords traits through my ResetPasswordController but it gave an exception 我之前已经运行过php artisan make:auth命令,并且已经在web.php定义了Auth::routes()我正在尝试通过我的ResetPasswordController访问ResetPasswords特征中的功能resets ,但是它给出了异常

Class App\\Http\\Controllers\\ResetPasswordController does not exist 类App \\ Http \\ Controllers \\ ResetPasswordController不存在

I am using the pre-defined controller that is located at App\\Http\\Controllers\\Auth\\ResetPasswor.php 我正在使用位于App \\ Http \\ Controllers \\ Auth \\ ResetPasswor.php的预定义控制器

ResetPasswordController ResetPasswordController

<?php

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;

class ResetPasswordController extends Controller
{

    use ResetsPasswords;


    public function reset(Request $request){
        $reset = $this->reset($request);
    }

    /**
     * Where to redirect users after resetting their password.
     *
     * @var string
     */
    protected $redirectTo = '/home';

    /**
     * Create a new controller instance.
     *
     * @return void
     */

    public function __construct()
    {
    $this->middleware('guest');
    }
}

web.php web.php

Auth::routes();


Route::post('password/reset','ResetPasswordController@reset');

SOLUTION

I have figured out where did i do wrong i had to add a Auth\\ in my routes 我已经弄清楚我在哪里做错了,我必须在路线中添加Auth\\

Route::post('password/reset','Auth\ResetPasswordController@reset');

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel 5.4 Class App\\Http\\Controllers\\Auth\\Request 不存在 - Laravel 5.4 Class App\Http\Controllers\Auth\Request does not exist Laravel 5.3 中不存在类 App\\Http\\Controllers\\Auth\\LoginController - Class App\Http\Controllers\Auth\LoginController does not exist in laravel 5.3 类 App\\Http\\Controllers\\Auth\\Request 不存在。 Laravel 5.3 - Class App\Http\Controllers\Auth\Request does not exist. Laravel 5.3 目标 class [App\Http\Controllers\auth\ResetCandidatePasswordController] 不存在。 部署到 nginx laravel 8 后 - target class [App\Http\Controllers\auth\ResetCandidatePasswordController] does not exist. after deployment to nginx laravel 8 目标类 [App\\Http\\Controllers\\Api\\Auth\\AuthController] 不存在 - Target class [App\Http\Controllers\Api\Auth\AuthController] does not exist 方法App \\ Http \\ Controllers \\ SkillController :: show不存在。 -Laravel 5.7 - Method App\Http\Controllers\SkillController::show does not exist. - Laravel 5.7 ReflectionException类App \\ Http \\ Controllers \\ ContactController不存在Laravel 5.2 - ReflectionException Class App\Http\Controllers\ContactController does not exist Laravel 5.2 类 App\\Http\\Controllers\\AuthController 不存在 Laravel 5.2 - Class App\Http\Controllers\AuthController does not exist Laravel 5.2 ReflectionException类App \\ Http \\ Controllers \\ AdminBookingsController不存在Laravel-5 - ReflectionException Class App\Http\Controllers\AdminBookingsController does not exist Laravel-5 Laravel: ReflectionException - Class App\\Http\\Controllers\\XXXX 不存在 - Laravel: ReflectionException - Class App\Http\Controllers\XXXX does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM