$arr=[
'/catalog/id1.svg Химия для бассейнов',
'/catalog/id2.svg Бла бла бла',
];
$data = [];
foreach($arr as $link) {
$split = explode(' ',$link);
$path = array_shift($split);
$name = implode(' ',$split);
$data[] = [
'path'=>$path,
'name'=>$name
];
}
print_r($data);
<?php foreach ($data as $link);?>
<div class="_30CWHKH _3eXsdaG" str="2">
<div class="_1FmS6_e"><img alt="Фильтры для бассейнов" src="<?php echo $link['path']; ?>" /></div>
<a class="o0XE4_n" href="#">
<h2 class="_2PmikUJ" txt="2"><?php echo $link['name']; ?></h2>
<div data-dy="menu-item-tag"></div>
</a>
</div>
<? endforeach;?>
<head>
...
@yield('metrics')
@extends ('default')
@section ('metricks')
...
@endsection
<style scoped>
$('input[name="radio"]').click(function(){
let id = $(this).val().toLowerCase() //строчные буквы
id = id.substring(0,id.length-1) //удаляем последний символ (1)
var target2 = $('.'+id+'-wrapper') //меняем селектор
$('.none').not(target2).hide(0); //ваша функция
target2.fadeIn(500);
});
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
import StoreData from './store'
const store = new Vuex.Store(StoreData);
const app = new Vue({
el: '#app',
store,
});
import bookings from './bookings'
import events from './events'
export default {
modules: {
bookings,
events
}
}
let dialog = {}
dialog['show'] = (command) => {
return command;
};
Vue.prototype.$dialog = dialog// регистрируете
onTaskAddClick () {
console.log(this.$dialog.show('i am show command'))
}