Comments (7)
Awesome!! Thanks @nunomaduro
from folio.
I was just coming to suggest this idea.
After watching the launch on YouTube and seeing that folio could be used along side normal routing, I was wondering if the folio routing could be restricted to a domain or subdomain just like the OP is asking.
eg. I have my SuperGreatSaaS at SGSS.com which is a normal Laravel 10 app and I want docs.SGSS.com to be routed by folio.
Is there a setting that I could use to map the subdomain to folio and the rest of the site to the normal routing?
I think this is what @nmfirdausw is asking. (It is certainly what I am asking)
from folio.
@njames
Right now I'm just used it like this,
last if is for generating folio with artisan command and view folio:list
if (str_starts_with(url(''), 'http://admin.')) {
Folio::route(resource_path('views/pages/admin'), middleware: [
'*' => [
'subdomain.admin',
],
]);
}
if (str_starts_with(url(''), 'http://partner.')) {
Folio::route(resource_path('views/pages/partner'), middleware: [
'*' => [
'subdomain.partner',
],
]);
}
if (config('app.env') === 'local' && url('') === config('app.url')) {
Folio::route(resource_path('views/pages'), middleware: [
'*' => [
//
],
]);
}
from folio.
I did test #62 feat/domains branch, It seems not working like I expected,
Or maybe I'm not use that properly, hope you can guide through,
My Issue is,
I add this two line in FolioServiceProvider,
public function boot(): void
{
Folio::path(resource_path('views/pages/admin'))->domain('admin.mydomain.test');
Folio::path(resource_path('views/pages/partner'))->domain('partner.mydomain.test');
}
When I access to admin.mydomain.test/login, It return 404,
But for partner.mydomain.test/login, It Success
It seems only second config is registered.
from folio.
That's a different issue - that already existed on Folio@beta2. Can you create a new issue please?
from folio.
@nmfirdausw This will address your issue: #67.
from folio.
Thanks @nunomaduro Now Folio is perfect for me.
from folio.
Related Issues (20)
- The shared variable in the `render` function can not be accessed between `@php` and `@endphp` directives HOT 1
- Default route name HOT 1
- Create paths automatically when not exists HOT 2
- `index` blade file with deeply nested model route binding not working HOT 3
- Support for Other HTTP Methods HOT 8
- Folio should work with other template engines (like Twig) HOT 1
- name route function is not working in folio HOT 1
- Nested model route binding disables views HOT 3
- Nested model route binding keeps disabling views HOT 3
- Empty segments in multi-segment wildcard views are not possible HOT 1
- Wildcard route collision HOT 6
- Route model binding connection HOT 4
- Missing URI prefix when calling `php artisan folio:list` HOT 1
- domain() works with only one domain. HOT 5
- Can't generate url route which starts with "/index" HOT 2
- Problem with subdomain HOT 1
- Session not set in Global Scope HOT 3
- Folio Route Fallback HOT 8
- allow custom route registrar action for volt HOT 2
- Support Fragment directive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from folio.