Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

How to build an admin panel

$
0
0
Hello guys, I've been wondering what is the right way to start the admin panel.

I mean I already have the admin pages, etc; but what I want is to block the access to the public, is there a way to do it by htaccess, or can you explain me how to do some type of login. 

And I think is going to be little bit hard, because as stated above all admin pages are done, but I never though of dong a login panel before accessing to it. 

Here is my controller (Admin/ index function):
PHP Code:
public function index(){
        
    
$data['title'] = 'Admin Panel';
    
$data['blog'] = $this->blog_model->get_blog();
    
$data['portfolio'] = $this->portfolio_model->get_portfolio();


 
       $this->load->view('templates/head'$data);
    
$this->load->view('templates/navbar'$data);
 
       $this->load->view('admin/dashboard',$data);
 
       $this->load->view('templates/footer'$data);
 
       

that's all what I got, I did not even create an admin model, or anything related to it.Neither a table in the databse.)

This is my dashboard:
[Image: 7b2d7ac45e0abdc28057cd7997d79ee2.jpg]

As I said the dashboard is completely done, with all the functions working, I just need to block the access

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>