[GH-ISSUE #30] Route [websites.show] not defined #21

Closed
opened 2026-02-27 09:12:37 +03:00 by kerem · 2 comments
Owner

Originally created by @martin-ro on GitHub (Sep 3, 2020).
Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/30

Had this error in the logs..

{
    "message": "Route [websites.show] not defined. (View: /var/task/resources/views/mail/dns-changed.blade.php)",
    "context": {
        "exception": {
            "class": "ErrorException",
            "message": "Route [websites.show] not defined. (View: /var/task/resources/views/mail/dns-changed.blade.php)",
            "code": 0,
            "file": "/var/task/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:420",
            "previous": {
                "class": "Symfony\\Component\\Routing\\Exception\\RouteNotFoundException",
                "message": "Route [websites.show] not defined.",
                "code": 0,
                "file": "/var/task/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:420"
            }
        },
        "aws_request_id": "xxx"
    },
    "level": 400,
    "level_name": "ERROR",
    "channel": "staging",
    "datetime": "2020-09-03T04:00:41.893408+01:00",
    "extra": {}
}

app/Website.php

/**
     * @return string
     */
    public function getShowLinkAttribute()
    {
        return route('websites.show', $this->id);
    }
Originally created by @martin-ro on GitHub (Sep 3, 2020). Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/30 Had this error in the logs.. ``` { "message": "Route [websites.show] not defined. (View: /var/task/resources/views/mail/dns-changed.blade.php)", "context": { "exception": { "class": "ErrorException", "message": "Route [websites.show] not defined. (View: /var/task/resources/views/mail/dns-changed.blade.php)", "code": 0, "file": "/var/task/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:420", "previous": { "class": "Symfony\\Component\\Routing\\Exception\\RouteNotFoundException", "message": "Route [websites.show] not defined.", "code": 0, "file": "/var/task/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:420" } }, "aws_request_id": "xxx" }, "level": 400, "level_name": "ERROR", "channel": "staging", "datetime": "2020-09-03T04:00:41.893408+01:00", "extra": {} } ``` `app/Website.php` ``` /** * @return string */ public function getShowLinkAttribute() { return route('websites.show', $this->id); } ```
kerem 2026-02-27 09:12:37 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@OwenMelbz commented on GitHub (Sep 13, 2020):

Hi,

Websites.show should exist as it's a Laravel Resource controller.

If you do...

php artisan route:list

Do you see the route? If not could you share the output please.

Thanks

<!-- gh-comment-id:691673724 --> @OwenMelbz commented on GitHub (Sep 13, 2020): Hi, Websites.show should exist as it's a Laravel Resource controller. If you do... php artisan route:list Do you see the route? If not could you share the output please. Thanks
Author
Owner

@OwenMelbz commented on GitHub (Sep 17, 2020):

I've just double checked this and can see that it's definitely registered.

odin on  master 🐘  v7.4.3
➜ php artisan route:list | grep "websites.show"
| GET/HEAD  | websites/{website} | websites.show | App\Http\Controllers\WebsiteController@show |

Will close this, however can continue to reply if needed

<!-- gh-comment-id:694249942 --> @OwenMelbz commented on GitHub (Sep 17, 2020): I've just double checked this and can see that it's definitely registered. ``` odin on  master 🐘 v7.4.3 ➜ php artisan route:list | grep "websites.show" | GET/HEAD | websites/{website} | websites.show | App\Http\Controllers\WebsiteController@show | ``` Will close this, however can continue to reply if needed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/odin-maelstrom-cms#21
No description provided.