getRouteByKeyName another model laravel

Posted 9 months ago by Dronax

I have two models:

  • Categories
  • CategoriesTranslations

In model categories I writed:

    public function getRouteKeyName(){
        return 'alias';

Column alias in model CategoriesTranslations. I need relationship?

Column alias belogns model CategoriesTranslations. How I can return alias from model CategoriesTranslations? My code is not working.

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.