Ejemplo n.º 1
0
 public function getBlock($name, $type = 'selectmultiplewnew')
 {
     $label = str_replace('_', ' ', $name);
     Block::unguard();
     $block = Block::firstOrCreate(['name' => $name, 'label' => ucwords($label), 'note' => 'Select or add new ' . $name, 'category_id' => 1, 'type' => $type]);
     Block::reguard();
     return $block;
 }