|
Henry Spencer - 2021-06-21 05:27:57
Hi Aby,
thank You for the script, I hope I can use it successfully.
My problem is, that I can't add a new page. Instead of "No View Could Be Loaded" I get an 404 error "Page Not Found".
This have I done: I added a Eingang.php in modules/eingang/controllers:
<?php
class Eingang extends Aksara
{
public function index()
{
// Single method to handle all CRUD functionality
$this->render('eingang');
}
}
?>
This step is not working in my installation: https://www.youtube.com/watch?v=h2L93DzyWK4&t=21s
All other works fine.
Do you have a tip where can I find the problem?
Thank You very much,
Henry
Aby Dahana - 2021-06-21 05:44:48 - In reply to message 1 from Henry Spencer
Hello, Henry.
Thank you for trying Aksara.
Unfortunatelly the demonstration video of creating module is outdated and not been updated. The video demonstration is for previous version of Aksara. I hope i have time to update the video for current version of Aksara.
To create new module, please follow this snippet:
<?php namespace Modules\Eingang\Controllers;
class Eingang extends \Aksara\Laboratory\Core
{
public function index()
{
$this->render('eingang');
}
}
Make sure you have database table named "eingang". The parameter sent by "render" method indicates for database table name.
Also you may avoid to using php closing tag (?>) at end of script.
Please reply if you have another question.
Aby Dahana - 2021-06-21 05:47:23 - In reply to message 1 from Henry Spencer
Also please use the first upper letter for naming the folder or file for your module structure e.g: /modules/Eingang/Controllers/Eingang.php
Henry Spencer - 2021-06-21 08:19:24 - In reply to message 3 from Aby Dahana
Wow, thank you very much. It works now great. I like the flexibility in relation to the fast results. Bravo!
In next step I want to create some option fields for my invoices application.
The invoices should be able to marked as
- recurring
- one time
If rucurring I want to choose the count of days: 30, 120, 365.
Options and depending options I didn't find in documentation or in YT video (yes, I would read before asking) :-)
Thank You for a tip how I could realize it with Aksara.
Regards,
Henry
Aby Dahana - 2021-06-21 09:13:09 - In reply to message 4 from Henry Spencer
You can improve that with javascript (onselect). The technique is by adding class to your field (add_class method) and use the class to trigger the javascript function that will show days count option.
Henry Spencer - 2021-06-21 12:32:16 - In reply to message 5 from Aby Dahana
Ahh yes, thank You.
I see that I can use many existing Controllers as examples for own Controllers. This was not completely clear for me before. :-)
Great regards from Berlin,
Henry
|