Route and livewire pages display error
In my app i have a page with a livewire component
without a route, i simply call the page /customer/my-repairs
but now i need to add the route in my web.php route file
ListMyRepairs is the livewire component
at the end of the file i call the view
list-my-repairs.blade.php
but i get this error
9 Replies
and, the page(MyRepairs.php) is located under Filament/customer/Pages (i have a second panel called Customer)
Why do you register the route manually?
because i have in my app
a model for managing custom email template
fields are: subject, content and LINK
link can be internal or external
and appear in form of a button in the email
i need the route to process the link
internal link can be customer.repairs
external link https://www.google.com
link can be internal or externalIt doens't make sense to be a Filament page then.
?
but the page is a filament page in a secondary panel
where the user need to login to see his profile
there is no solution?
i don't want to put a full url in the email template
I thought it's external? Why do you register it via routes then, when it's already registered in a secondary panel?
I am not sure I get your issue. Too late today π
no no, i try to explain with a pair of screenshot
This is a template for an email message. If a link is set, a button will appear in the email. The link of the button can be internal, for example, "Check your profile" (on the app's website), or external, such as "Leave a review on Google."
When the link is internal, I use the route name to generate the link. For example, the route customer.repair generates a button link like www.myrepairwebsite.com/customer/my-repair.
However, when I added the new route to web.php:
Route::get('/customer/my-repairs', ListMyRepairs::class)->name('customer.repairs');
the link in the email is correct, but instead of displaying the customer's repairs page, I get the error: "Livewire page component layout view not found: [components.layouts.app]."
i've found an acceptable workaround by using
url($links[0]['url']) and save the internal url as /customer/my-repairs