コード例 #1
0
 public function handle()
 {
     $fields = $this->fieldList;
     if ($this->id) {
         $fields = $this->fieldsFromModel($this->id, $fields);
     }
     foreach ($fields as $fieldName => $fieldValue) {
         $fields[$fieldName] = old($fieldName, $fieldValue);
     }
     return array_merge($fields, ['allLinhas' => Linha::lists('titulo')->all()], ['allSegmentos' => Segmento::lists('titulo')->all()], ['allSuperficies' => Superficie::lists('titulo')->all()], ['allSujeiras' => Sujeira::lists('titulo')->all()]);
 }
コード例 #2
0
 public function destroy($id)
 {
     Segmento::find($id)->delete();
     return redirect()->route('admin.segmentos.index')->withSuccess('Excluido com sucesso!');
 }