Не видит скрипт Laravel

Создал скрипт, который выводит форму авторизации при нажатии на ссылку "Личный кабинет". Добавил в app.js сделал npm run dev, всё окей. Подключил скрипт через <script src="{{URL::asset('js/app.js')}}"></script> но в браузере пишет ошибку Uncaught ReferenceError: showHide is not definedat HTMLAnchorElement.onclick

Шаблон app.blade.php

    <!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>@yield('title')</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="../public/css/app.css">
<script src="{{URL::asset('js/app.js')}}"></script>
</head>
<body>
  <div id="wrapper">
  <header id = "header">
    @yield('header')
  </header>
  @yield('content')
     </div>
  <footer class="footer">
    <span>ООО "ЖКХ-ОНЛАЙН"</span>
  </footer>
</body>
</html>

Главная страница home.blade.php

@extends('layouts.app')

@section('title')
  Главная
@endsection
@section('header')
<script src="{{URL::asset('js/app.js')}}"></script>
<a href = "{{ route('home') }}"align="right"> Главная </a>
<a href = "#"align="right"> Новости </a>
<a href = "#"align="right"> О нас </a>
<a href = "javascript:void(0)" onclick="showHide('background_window')" align="right">Личный кабинет </a>
@endsection
@section('content')
<div id="background_window">
  <div class="auth_form">
    <p class="auth_text">Авторизация</p>
    @if($errors->any())
    <div class="aler alert-danger">
    <ul>
      @foreach($errors->all() as $error)
      <li>{{$error}}</li>
      @endforeach
    </ul>
    </div>
      @endif
    <form action="{{route('auth_submit')}}" method="post">
      @csrf
      <div class="auth_input">
        <label for="name">Логин</label>
        <input type="text" name="name" placeholder="Введите логин..."id="name"class="form-control">
      </div>
      <div class="auth_input">
        <label lass="auth_text" for="password">Пароль</label>
        <input type="password" name="password" placeholder="Введите пароль..."id="password"class="form-control">
      </div>
      <button type="submit" class="auth_button">Войти</button>
    </form>
  </div>
</div>
@endsection

Ответы (0 шт):