Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User profile support #2

Closed
CoderFetch opened this issue Mar 21, 2015 · 1 comment
Closed

User profile support #2

CoderFetch opened this issue Mar 21, 2015 · 1 comment
Assignees

Comments

@CoderFetch
Copy link

Hello,

Is there any way that I can add user profile support? The repository system is alien to me. I tried making a repository for users and doing all the other stuff, but this happens:

screen shot 2015-03-21 at 12 19 31 pm

My BaseController: https://gist.github.com/fetch404/2a42c7d5482e312bd5e4
My users repository class: https://gist.github.com/fetch404/ed90c61e055b16cddcc0
My routes.php (the one that comes with the package): https://gist.github.com/fetch404/e4eaf249f8c90d6abf40

Help would be appreciated. Thanks!

@Riari
Copy link
Collaborator

Riari commented Mar 21, 2015

Hi there,

The first thing to note is that any kind of features or functionality that aren't tied directly to the forum package should be done independently and not inside the forum package itself. Even if you're forking the package to make your own version of it, user profiles aren't intrinsic to a forum and should either live in a separate package or directly in your Laravel app's codebase.

The second thing to note (and I should probably update the readme to clarify this) is that the forum package doesn't provide any kind of user or login functionality of its own - so user profiles won't make sense unless your app already has those things. User authentication is built right into Laravel, so in most cases that part is covered; for user signup/login forms and access control, I can personally recommend https://github.com/Zizaco/confide and https://github.com/Zizaco/entrust

A quick search around for user profile packages turns up nothing, so, my suggestion would be to explore the ones I mentioned above if you need user signup/login functionality, then build your own UserProfile controller, model and associated routes/views (a repository would help abstract certain things from the controller and model, but it's not strictly necessary). You would then be able to override the forum package views to make post author names link to the profile routes you're generating.

If you need some pointers for that, I don't mind sharing the UserProfile components I'm using currently.

Edit: on closer inspection of your gists, it looks like you already have basic user handling. Sorry if I'm assuming too much about your setup - but the general point is still relevant :)

I hope that helps - let me know if it doesn't!

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants