Creating a custom service/library |
(02-05-2020, 08:30 AM)x1250 Wrote: Assuming you define validationRules in the model, you need to use something like the following in your controller method: Thanks for your reply. This is a solution, but is not the one I am looking for. I guess if I take a more generic example (and please assume I'm a newbie) it may illustrate where I'm struggling. I want to create a new class that has its own properties and methods, but has nothing to do with the tables in my database. Do I still create it as I would any other model, or should I use a service/library? If it is a service/library a very short example would help, because I'm struggling to understand how to do it from the documentation. Apologies if this comes across as a remedial quesion. |
Messages In This Thread |
Creating a custom service/library - by Fido L Dido - 02-05-2020, 06:37 AM
RE: Creating a custom service/library - by x1250 - 02-05-2020, 08:30 AM
RE: Creating a custom service/library - by Fido L Dido - 02-05-2020, 09:47 AM
RE: Creating a custom service/library - by littlej - 02-05-2020, 04:07 PM
RE: Creating a custom service/library - by Fido L Dido - 02-06-2020, 08:10 AM
RE: Creating a custom service/library - by littlej - 02-06-2020, 11:06 PM
|