Welcome Guest, Not a member yet? Register   Sign In
Dataset from database accessible on all controllers and views
#8

(This post was last modified: 03-07-2021, 09:08 PM by vitnibel.)

Hi

As a result of the is_offline function call, just the string will be returned.

PHP Code:
class Home extends BaseController
{
   public function index($locale '')
   {
       $this->is_offline();
   }


Therefore, nothing further happens.

If you change the function to an example like this

PHP Code:
public function is_offline()
{
    if(configItem('siteOffline')==1) {
        echo view('Home/offline');
        exit;
    }


then after its execution either nothing will happen or the offline page will be shown.
Reply


Messages In This Thread
RE: Dataset from database accessible on all controllers and views - by vitnibel - 03-07-2021, 07:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB