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

Usage in blade template #31

Open
eporsche opened this issue Jun 21, 2018 · 1 comment
Open

Usage in blade template #31

eporsche opened this issue Jun 21, 2018 · 1 comment

Comments

@eporsche
Copy link

Hi,
this question was actually part of another issue, which has now been marked as being solved. However this part may still be open, that is why I want to repeat it as new issue.

Is There A way To Use:
workflow_can()
workflow_transitions()
workflow_marked_places()
workflow_has_marked_place()

in blade template ?

Like in the example of Symfony https://symfony.com/doc/current/workflow/usage.html

Thank's

@riyuk
Copy link

riyuk commented Oct 16, 2018

Well. I don't think it's a huge difference.
In Symfony it's:

{% if workflow_can(post, 'publish') %}
    <a href="...">Publish article</a>
{% endif %}

In Blade it's:

@if($post->workflow_can('publish'))
    <a href="...">Publish article</a>
@endif

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