Is the template going to be the same but with user data involved? Or, are different users going to have different components? Either way, I would have a single template with variables loaded from the database based on Auth::user(). From there if they user lets say wanted a clock widget on their template have an entry in the database that would make it as true and have an @if statement. That's how I would go about it. Maybe yours is a bit more complex.
Well, imagine there are 2 users with 2 database- User A with DB-A, User B with DB-B.
Lets say the index page with 2 different template
User A template:
<html>
<body>
<div>
Template for User A {{$userAVariable}}
</div>
</body>
</html>
User A template:
<html>
<body>
<div>
Template for User B {{$userBVariable}}
</div>
</body>
</html>
Both template will be stored in their own database, lets say a table named "Template"
When render the page, template will be fetch from DB and render it.
Hope this clear about my question.
Thanks
I don't think that that is possible, you can look at Twig, that should be possible. See https://github.com/rcrowe/TwigBridge/tree/0.6 and http://twig.sensiolabs.org/doc/functions/template_from_string.html
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community