Question: In my head section of my `form.layout.blade.php` I have the following:

```
<head>
   <script src="/js/main.js"></script>
<head>

```

This is layout file is loaded before all pages are loaded. Is there a way to *not* load `main.js` for a specific route?

Answer: 
you can use if statement like this. main.js will not load on this page

```
@if(!Request::is('subpage/url'))
    <script src="/js/main.js"></script>
@endif

```
You can use if statements

```
@if(!in_array(Route::currentRouteName(), ['route.name', ...]))

   <script src="/js/main.js"></script>

@endif

```