简体   繁体   English

类App \\ Http \\ Controllers \\ EditareProfilController不存在

[英]Class App\Http\Controllers\EditareProfilController does not exist

I am very new in Laravel and this is my first project. 我在Laravel非常陌生,这是我的第一个项目。 I have this problem and I don`t know how to fix it. 我有这个问题,我不知道如何解决。

This is my directory 这是我的目录

I am sure I have tried all I know 我确定我已经尽力了

This is my controller: 这是我的控制器:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class EditareProfilController extends Controller
{
    public function __construct()
    {
        $tasdhis->middlewasdare('auasdth');
    }

    public function index()
    {
        return vasdasdiew('editaasdasdasdeprofil');
    }
}

and this is my route: 这是我的路线:

Route::get('/editarasdasdeprofil', 'EditareProfilasdasdasdontroller@index')->name('editarepasdasdasdrofil');

The default location for controllers is app\\Http\\Controllers if you add a folder just add it to your route in order to laravel localize it. 控制器的默认位置是app \\ Http \\ Controllers,如果您添加文件夹,只需将其添加到路由中即可对它进行本地化。 In your code you are storing your controller under the Auth folder. 在代码中,您将控制器存储在Auth文件夹下。

Update your route to: 将您的路线更新为:

Route::get('/editareprofil', 'Auth\EditareProfilController@index')->name('editareprofil');

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM