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:
As I said the dashboard is completely done, with all the functions working, I just need to block the access
I do Front-End development most of the time