I have seen many tutorials. When naming the view, they all use a writing method similar to user.index. I have a view. The file name is user.index.blade.php. In the controller, I use return view('user. index'); prompts View [user.index] not found.
If you change it to user_index.blade.php and call it using return view('user_index');, there will be no problem.
Is there any way to use dots to separate names?
Okay, I’ve done it myself, return view('user.index'); There is no problem with this syntax, but it does not mean that the file name should be written as user.index.blade.php, but index.blade.php, and It should be placed in the resources/views/user directory.