Search code examples
laravellaravel-bladepartial-viewslaravel-9

View ['view.name'] not found


why I have this Problem please? this is my blade code in laravel 9:

<form class="row g-3" method="POST" action="{{ route('users.store') }}" >
    @csrf
    @include('users.partials.form')

    <div class="col-12">
        <button class="btn btn-primary" type="submit" >Add user</button>
    </div>
</form>

this is the structure of my blade: enter image description here

-Thank you


Solution

  • If your return line is like: return view('dashboard.admin.users.create');, then your file path must be resources/views/dashboard/admin/users/create.blade.php

    Moreover, include the form like : @include('dashboard.admin.users.partials.form')