argument('frame'))) throw new \Exception('Frame is not numeric: '.$this->argument('frame')); if (strlen($this->argument('index')) != 1 OR ! preg_match('/^[a-z]$/',$this->argument('index'))) throw new \Exception('Subframe failed validation'); try { $o = Frame::where('frame',$this->argument('frame')) ->where('index',$this->argument('index')) ->firstOrFail(); } catch (ModelNotFoundException $e) { $this->error('Page not found to delete: '.$this->argument('frame').$this->argument('index')); die(1); } $o->delete(); $this->info('Page deleted: '.$this->argument('frame').$this->argument('index')); } }