Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     $this->title($this->translate('components'));
     $this->before(['edit', 'save', 'destroy'], function () {
         $this->object = Component::find(Request::$properties->get('id'));
         if (!$this->object || $this->object->project_id != $this->currentProject['id']) {
             return $this->show404();
         }
     });
 }