dycoda
2 weeks ago
582
69
Laravel

View Error or Bug?

Posted 2 weeks ago by dycoda

I'm not sure is this error on my code or is it a bug, my view return 404

in my profile.blade.php I have a button pointing to url below

<a href="/users/finances/{{ $finance->id }}/edit">{{ __('Edit') }}</a>

and I specified the route on web.php

Route::get('users/finances/{finance}/edit', '[email protected]);

and in my UserFinancialController.php file I write the method.

public function edit(UserFinance $userFinance)
{
    return view('users.financial.edit', compact('userFinance');
}

even when I tried to test dump on my edit method the request doesn't seems to hit the controller method at all

public function edit(UserFinance $userFinance)
{
    dd("It's here");
    return view('users.financial.edit', compact('userFinance');
}

Is my code wrong or is it some bug?

EDIT:

My app directories as below:

resources/views/users/profile.blade.php

resources/views/users/financial/edit.blade.php

Please sign in or create an account to participate in this conversation.