function __construct()
 {
     parent::__construct();
     $this->_pid = app('request')->get('pid');
     isset($this->_pid) && session(['pid' => $this->_pid]);
     !isset($this->_pid) && ($this->_pid = session('pid'));
     $this->_product = Product::findOrFail($this->_pid);
 }
 function __construct()
 {
     parent::__construct();
     $this->_pid = app('request')->get('pid');
     if (!empty($this->_pid)) {
         session(['pid' => $this->_pid]);
         $this->_product = Product::findOrFail($this->_pid);
     } else {
         $this->_pid = session('pid');
         $this->_product = Product::findOrFail($this->_pid);
     }
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->agent_ids = Factory::find($this->factory->getKey())->agent_ids()->toArray();
 }