Airship\Cabin\Bridge\Landing\LoggedInUsersOnly::airshipLand PHP Method

airshipLand() public method

This function is called after the dependencies have been injected by AutoPilot. Think of it as a user-land constructor.
public airshipLand ( )
        public function airshipLand()
        {
            parent::airshipLand();
            $this->storeLensVar('showmenu', true);
            if (!$this->isLoggedIn()) {
                // You need to log in first!
                \Airship\redirect($this->airship_cabin_prefix);
            } elseif (!$this->can('read') && !$this->can('index')) {
                // Sorry, you can't read this?
                \Airship\redirect($this->airship_cabin_prefix . '/error/?' . \http_build_query(['error' => '403 Forbidden']));
            }
        }

Usage Example

Ejemplo n.º 1
0
 /**
  * This function is called after the dependencies have been injected by
  * AutoPilot. Think of it as a user-land constructor.
  */
 public function airshipLand()
 {
     parent::airshipLand();
     $this->blog = $this->blueprint('Blog');
     $this->author = $this->blueprint('Author');
     $this->storeLensVar('active_submenu', 'Blog');
 }
All Usage Examples Of Airship\Cabin\Bridge\Landing\LoggedInUsersOnly::airshipLand
LoggedInUsersOnly