doublesecretagency / craft-businesslogic Goto Github PK
View Code? Open in Web Editor NEWBusiness Logic module template for Craft CMS
License: MIT License
Business Logic module template for Craft CMS
License: MIT License
Hello :) thank you so much for this plugin. For someone quite new to the Craft environment, this really helped kickstart my module/plugin development!
I was wondering - I would like to add a console controller to my businesslogic code but not 100% sure how to. I've been bouncing between your documentation and a bunch of nystudio.com articles, including their plugin factory... but not getting much luck.
Do you have any guidance at all please?
Thank you for providing this module example. Once it is set up as instructed, is the following URL correct for invoking the actionExampleRoute() action in ExampleController?...
http://my-craft-site/business-logic/example/example-route
When I try it in a browser, I get a 404/Template not found: business-logic/example/example-route error rather than executing code in that action. I'm not sure if I set it up incorrectly or if I'm not understanding how to compose a URL that invokes that action as expected.
Same question posted on Craft Stack Exchange here: https://craftcms.stackexchange.com/questions/37310/what-is-the-correct-way-to-format-a-module-controller-action-url
Thank you in advance for your assistance.
Hi Lindsey,
Thank you for sharing this very useful business logic template.
I've bumped into an issue which I encountered a couple of years ago as well:
https://craftcms.stackexchange.com/questions/33752/doublesecretagency-business-logic-module-template-404-on-example-form-action
The example form action doesn't work.
Back then I've resolved it by using another approach, but I've looked a bit more into it now and the issue seems to be quite simple: the module is referenced incorrectly in the example code. The example action-input is:
<input type="hidden" name="action" value="business-logic/example/example-form-submit">
but it should be:
<input type="hidden" name="action" value="businesslogic/example/example-form-submit">
Omitting the dash in the "business-logic" name, since the module is being loaded as "businesslogic" instead.
Hey guys, this is just a general discussion thread to figure out what works, what doesn't work, and suggestions for changes. This is a completely open forum, so feel free to bring up anything!
And feel free to fork this project! Pull requests are always welcome. :)
First of all, thanks so much for putting this together. It's been a great help.
Quick question for you:
In your support page for variables, you list the following example for calling a service from variables (modified for the actual businesslogic module):
public function exampleService()
{
return BusinessLogic::$instance->example->exampleService();
}
This is returning the error: Class "modules\businesslogic\variables\BusinessLogic" not found
Can you tell me if there's something obvious I'm missing here? Is this potentially Craft 4 related? Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.