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

Create module() helper function and @module() blade directive #2044

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

solomon-ochepa
Copy link
Contributor

@solomon-ochepa solomon-ochepa commented Mar 24, 2025

Usages

Module status

$status = module('blog');
if (module('blog')) {
   return "Blogs";
}

Module instance

$blog = module('blog', true);

Blade directive

@module('blog')
    <h3> Blogs </h3>
@endmodule
@module('blog')
    <h3> Blogs </h3>
@else
    <p> No Blogs </p>
@endmodule

@solomon-ochepa solomon-ochepa force-pushed the create-module-helper-function branch from 3250320 to f31cef3 Compare March 25, 2025 19:17
## Usage
```blade
@module('blog')
<p>Blog module exists!</p>
@endmodule
```
…ibility and consistency

The helper function should return the module status by default instead of the instance, as this is the common usage.
@solomon-ochepa solomon-ochepa changed the title Create module() helper function Create module() helper function and @module() blade directive Mar 27, 2025
@solomon-ochepa
Copy link
Contributor Author

Hi, @dcblogdev. Your attention is needed here, please.

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

Successfully merging this pull request may close these issues.

1 participant