• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Dashboard page that display multiple results from mysql queries or tables

#1
Hello 

I am a beginner in CI 4. I hope I understood the main principles. I did my first models/controllers/views to manage my database using layout and also view cell.
I display single view of my tables in order to add/edit/update them.

Now I would like to create a dashboard like the beautiful AdminLTE, using multiple results from queries or tables.
As an example this dashboard will display some parameters like total of users , the content of table 1 that contains several lines and columns in the top right corner of the page, the content of query 1 that contains also several lines and contents in the bottom left corner of the page.

As today in each of my views I have this code
<?= $this->extend('layouts/main'?>
<?= $this->section('content'?>
<?= $form ?>
<?= $this->endSection() ?>


Is it possible ? Do you have solutions in order to do that ? any examples of code ?

Thanks a lot
Reply

#2
Yes, just run your queries and save the data before you run the next one.

Build up what you want to show on the page and then send it to the view.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(09-17-2020, 12:51 AM)InsiteFX Wrote: Yes, just run your queries and save the data before you run the next one.

Build up what you want to show on the page and then send it to the view.

Thanks, I was thinking like this, that mean it will be the role of the controller to manage various data coming from the database and to create the form that will be sent to the view.
 My difficulty is more how to build my form and use AdminLTE in order to insert my database data like tables or parmeters.
If you know where I can find code examples of implementation of admin LTE dashboard connected to database results.
It will ease my implementation

Thanks a lot
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.