Voyager: custom views for de post models

Created on 1 Aug 2018  路  5Comments  路  Source: the-control-group/voyager

Laravel Version: 5.26.27
Voyager Version: 1.1.3
PHP Version: 7.2.1
Database Driver & Version: MySQL 5.6.38
Description:
Hi Everyone,

I'm new to voyager, but have already managed to create tables, populate them and configure their access priviledges for BREAD.

But i need one option to see in the posts the custom roles can views just the him self post, i see one option

@foreach($dataTypeContent->where('author_id','=', Auth::user()->id) as $data)

but this code modify all views because is in the view. i need some more generic in the model

Is this possible with voyager or it calls for custom code?
Thanks in advance!

question

Most helpful comment

We're all volunteers here. If you NEED immediate support, Slack is a much better option.

Also, "Latest" is not a valid version number. Please update that as it's important information for our troubleshooting.

All 5 comments

@fletch3555 can you help me !!

We're all volunteers here. If you NEED immediate support, Slack is a much better option.

Also, "Latest" is not a valid version number. Please update that as it's important information for our troubleshooting.

@fletch3555 now right thanks!!

Thank you.

There are a few possible options to solve this, and which you do is really up to you and your needs. I recommend looking into "Global Scopes" in the Laravel docs, and see where that brings you. If that doesn't work for your needs, then it might lead you to something that will.

Implementation questions like this are really best suited for our Slack's #help channel. We try to keep the github issue tracker for package bugs/defects and new feature requests.

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings