Giter Club home page Giter Club logo

Comments (5)

nunomaduro avatar nunomaduro commented on May 14, 2024

Hey there,

I am unable to reproduce your issue. However, it seems that the first Folio::path line points to folders shared with the lines below, specifically views/pages/tenants.

Can you try something like this and let me know how it goes?

        Folio::path(resource_path("views/pages/something-else"));
        Folio::domain('domain-one.test')->path(resource_path("views/pages/tenants/one"));
        Folio::domain('domain-two.test')->path(resource_path("views/pages/tenants/two"));

from folio.

winavin avatar winavin commented on May 14, 2024

This is my folder structure.
Screenshot 2023-12-19 160745

in FolioServiceProvider

public function boot(): void
    {
        Folio::path(resource_path("views/pages/central"));
        Folio::domain('domain-one.test')->path(resource_path("views/pages/tenants/one"));
        Folio::domain('domain-two.test')->path(resource_path("views/pages/tenants/two"));
    }

Output for Folio Routes

php artisan folio:list


  GET       / .................................. resources/views/pages/central/index.blade.php  
  GET       domain-one.test/about-us ........... resources/views/pages/tenants/one/about-us.blade.php 

---------------------------------xxx------------------xxx----------------------
for

public function boot(): void
    {
        Folio::path(resource_path("views/pages"));
        Folio::domain('domain-one.test')->path(resource_path("views/pages/tenants/one"));
        Folio::domain('domain-two.test')->path(resource_path("views/pages/tenants/two"));
    }

Output is

  GET       domain-one.test/ ................ resources/views/pages/tenants/one/index.blade.php  
  GET       domain-one.test/about-us ........ resources/views/pages/tenants/one/about-us.blade.php  
  GET       /central ........................ resources/views/pages/central/index.blade.php  
  GET       /tenants/one .................... resources/views/pages/tenants/one/index.blade.php  
  GET       /tenants/one/about-us ........... resources/views/pages/tenants/one/about-us.blade.php  
  GET       /tenants/two .................... resources/views/pages/tenants/two/index.blade.php  
  GET       /tenants/two/about-us ........... resources/views/pages/tenants/two/about-us.blade.php

from folio.

winavin avatar winavin commented on May 14, 2024

It seems like when there are same folder structure for multiple domains, that same folder structure conflict with creating urls.

pages
- tenants
---tenant-one
----- index.blade.php [ showing ]
----- same-page-name-for-each-domain.blade.php [ showing ]
----- different-page-name-for-domain-one.blade.php [ showing ]
---tenant-two
----- index.blade.php [ not showing ]
----- same-page-name-for-each-domain.blade.php [ not showing ]
----- different-page-name-for-domain-two.blade.php [ showing ]

then

routes for index and same page is not showing for domain two and following domains. while, different page names or folder structure is registered for each domain.

from folio.

nunomaduro avatar nunomaduro commented on May 14, 2024

Thanks for sharing that info. Do you mind of creating and sharing a GitHub link to a open-source repository with fresh Laravel application that I can clone to reproduce your issue?

from folio.

nunomaduro avatar nunomaduro commented on May 14, 2024

Because it may take a while, please create an new issue with that link, and a reference to this issue. Going to close this issue meanwhile.

from folio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.