What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Examprep Hi Everyone I need to know while creating a new module in Zed 1. I create
Examprep
Hi Everyone I need to know while creating a new module in Zed
1. I created 2 different files in " src/Pyz/Zed/MyModule/Business " for Facade and Factory
named as Facade.php and Factory.php
2. Now i created a MyModule folder inside Business, Now I want to perform string reverser do i have to create another file inside " src/Pyz/Zed/MyModule/Business/MyModule "
I am bit confused here
Comments
-
Hello,
Your Facade should be named MyModuleFacade.php and Factory should be named MyModuleBusinessFactory.php. You do not need to make a 'MyModule' folder inside the Business folder. Please refer to this link for the step to step tutorial guide https://docs.spryker.com/docs/scos/dev/tutorials-and-howtos/introduction-tutorials/tutorial-architectural-walkthrough-spryker-commerce-os.html#b[β¦]g
0 -
Hi @U048WDEP3R7 I rename my file as you mentioned
In MyModuleFacade.phppublic function createStringReverser() { return new StringReverser(); }
In MyModuleFactory.php
public function reverseString($originalString)
{
return $this->getFactory()
->createStringReverser()
->reverseString($originalString);
}Now to reflect changes in
"https://zed.mysprykershop.com/hello-spryker"
do we need to run any CLI0 -
The documentation is not updated. mysprykershop URL won't work if you are running Spryker locally via docker. Can you please tell me how are you running Spryker on your machine?
0 -
Hi, @U048WDEP3R7 I am running Spryker on Docker, can you tell me what step I am missing?
0 -
Hello, yes of course I can try. Can you please post a screenshot of the directory structure of your module with all files in it?
0 -
Attaching each file's content ,Please let me know if you need more details
0 -
Thanks for sharing. I assume the problem is you cant access the controller via a URL, right?
0 -
Please go to http://backoffice.de.spryker.local/examprep and see if you see your controller
0 -
Yes, we are not able to access the controller via URL, I go to the link it gives Error 404 attaching the screenshot
0 -
Please try running
docker/sdk console cache:class-resolver:build
anddocker/sdk console cache:empty-all
0 -
and it should be http://backoffice.de.spryker.local/examprep not http://backoffice.de.spryker.local/Examprep
0 -
actually, I tried both URLs
I run the above commands, it gives the error FacadeNotFoundException0 -
@U045KD44L7L this is a sign that your route is working. but some how your Facade is not being resolved. Can you please confirm if your
Examprep
folder is inside thesrc/Pyz/Zed
directory?0 -
The path of this facade should be
src/Pyz/Zed/Examprep/Business/ExamprepFacade.php
0 -
If this is your folder structure for a Zed module, the path is wrong. Your Zed module should be in
src/Pyz/Zed/Examprep/
0 -
- I re-checked the path and it's similar to what you have mentioned in response,
- Examprep and Facade file folder also looks fine as you mentioned
0 -
@U045KD44L7L Can you please send me another screenshot with the file structure inside the src folder showing your project files?
0 -
Yes @U048WDEP3R7, please have a look at the screenshot I've included.
0 -
Thanks. I am not sure whats wrong as it looks fine to me in the screenshot. Maybe
cache:class-resolver:build
can fix it?0 -
Thanks, @U048WDEP3R7 for the support π
0 -
@U045KD44L7L You are welcome. I hope it worked for you.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random