How does laravel elixir Realize Real-time Preview

  node.js, question

How to use elixir and browserSync to realize real-time preview of php pages under laravel5 environment?

var gulp             = require('gulp'),
 browserSync     = require('browser-sync').create(),
 less             = require('gulp-less');
 
 var elixir             = require('laravel-elixir');
 //elixir.config.sourcemaps = false;
 
 var config = {
 name : 'baseblue',
 version : '2.0.0',
 proxy : 'localhost:8888',
 jsDir : 'public/js/',
 cssDir : 'public/css/',
 minDir : 'public/min',
 viewDir : 'resources/views/'
 bracket
 gulp.task('server', function() {
 browserSync.init({
 Proxy: config.proxy,// proxy address
 notify: false,
 open: true
 });
 gulp.watch(['resources/assets/less/test.less'],['testless']);
 gulp.watch([
 Config.viewDir' **/*.blade.php',
 Config.jsDir plus' **/*.js',
 Csdir plus' **/*.css'
 ]).on("change", browserSync.reload);
 });
 gulp.task('testless',function(){
 return elixir(function(mix) {
 mix.less('test.less');
 });
 });

Why can’t elixir be used in the function of gulp task?

Laravel comes with browserSync.