From 2a6111ab19075a0a4de21d1c979f0d8b72edee7c Mon Sep 17 00:00:00 2001 From: dev-chiefworks Date: Tue, 10 Jan 2023 08:32:43 -0500 Subject: [PATCH] Added FAQ --- app/Config/Routes.php | 1 + app/Controllers/Myfit.php | 7 +++++- app/Models/myfitFaqData.php | 48 +++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 app/Models/myfitFaqData.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 6f4ea75..5514451 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -43,6 +43,7 @@ $routes->post('/chiefsoft/site/contact', 'Chiefsoft::contact'); $routes->get('/mermsmemr/myfit/country', 'Myfit::country'); $routes->get('/mermsmemr/myfit/blogdata/(:any)', 'Myfit::blogdata/$1'); $routes->get('/mermsmemr/myfit/blogdata', 'Myfit::blogdata'); // when no limit is sent +$routes->get('/mermsmemr/myfit/faq', 'Myfit::faq'); $routes->post('/mermsmemr/myfit/contact', 'Myfit::contact'); $routes->post('/mermsmemr/myfit/pricing', 'Myfit::pricing'); diff --git a/app/Controllers/Myfit.php b/app/Controllers/Myfit.php index 54ad255..7944bfb 100644 --- a/app/Controllers/Myfit.php +++ b/app/Controllers/Myfit.php @@ -33,7 +33,7 @@ class Myfit extends BaseController public function contact() { - $inx = array( + $inx = array( 'name' => $this->post('name'), 'email' => $this->post('email'), 'country' => $this->post('country'), @@ -65,4 +65,9 @@ class Myfit extends BaseController return $this->response->setJson($mCountry->getSiteCountries([])); } + public function faq(){ + $mFaq = new \App\Models\myfitFaqData(); + return $this->response->setJson($mFaq->getSiteFaq([])); + } + } \ No newline at end of file diff --git a/app/Models/myfitFaqData.php b/app/Models/myfitFaqData.php new file mode 100644 index 0000000..1825511 --- /dev/null +++ b/app/Models/myfitFaqData.php @@ -0,0 +1,48 @@ +'This is the title 1', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ], + [ + 'title'=>'This is the title 2', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ], + [ + 'title'=>'This is the title 3', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ], + [ + 'title'=>'This is the title 4', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ], + [ + 'title'=>'This is the title 5', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ], + [ + 'title'=>'This is the title 6', + 'text'=>'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.' + ] + ); + + } + +} \ No newline at end of file