0
我需要與社交按鈕創建菜單廣播數據+ vue.js
我有主模板
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<title>Lapins - @yield('title')</title>
@include('head')
</head>
<body>
<div id="lapins">
@include('components/header')
@yield('content')
</div>
<script src="js/app.js"></script>
</body>
</html>
這是我的模板路由器
Route::get('/', function() {
$headerBar = [
'socials' => [
[
'name' => 'Email',
'type' => 'email',
'value' => '[email protected]'
],
[
'name' => 'Phone',
'type' => 'bell',
'value' => '066 866 14 23'
],
[
'name' => 'Facebook',
'type' => 'facebook',
'value' => 'http://facebook.com/'
],
[
'name' => 'Twitter',
'type' => 'twitter',
'value' => 'http://twitter.com/'
],
[
'name' => 'Pinterest',
'type' => 'pinterest',
'value' => 'http://pinterest.com/'
]
]
];
return view('layouts.index', $headerBar);
});
我怎麼能播放@include('components/header')中的$ headerBar? 或者這是不正確的方式來解決這個任務?