即使有源代码,Laravel刀片视图页面也是空的

My blade view shows a empty page, but if I press CTRL + U to show the source code, then I get this:

<!DOCTYPE html>
<html>
<head>
    <link rel='stylesheet' href='http://localhost/portal_testing/public/css/style.css'/>
    <script src='http://localhost/portal_testing/public/js/main.js'/>
</head>
<body>
    <div>   
        <div class='infoBox'>
            <h4 class='infoBoxTitle'>Log:</h4>
            <div class='infoBoxContent'> 
               <p>test</p>
            </div>
        </div>

        <div class='errorBox'>
            <h4 class='errorBoxTitle'>Error Log:</h4>
            <div class='errorBoxContent'> 
               <p>test</p>
            </div>
        </div>
    </div>
</body>
</html>

Why is it not rendering even though there is valid code?

UPDATE:


Javascript:

//Accordion:
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
    acc[i].onclick = function(){
        this.classList.toggle("active");
        var panel = this.nextElementSibling;
        if (panel.style.display === "block") {
            panel.style.display = "none";
        } else {
            panel.style.display = "block";
        }
    }
}

CSS

.infoBox {
    font-family: arial;
    padding:2px;
    background-color: #DADADA;
    min-width: 300px;
    min-height: 100px;
    margin:2px;
    border:1px solid black;
}

.infoBoxTitle {
    padding:4px;
    font-size: 13px;
    color: red;
    margin: 1px;
    text-decoration: underline;

}

.infoBoxContent {
    font-size: 10px;
    padding-left:5px;
    margin-left:10px;
    border: 1px solid gray;
}

.errorBox {
    font-family: arial;
    padding:2px;
    background-color: #838383;
    min-width: 300px;
    min-height: 100px;
    margin:2px;
    border:1px solid black;
}

.errorBoxTitle {
    padding:4px;
    font-family: calibry;
    font-size: 13px;
    color: white;
    margin: 1px;
    text-decoration: underline;
}

.errorBoxContent {
    color: white;
    font-size: 11px;
    padding-left:5px;
    margin-left:10px;
    border: 4px solid white;
}

I found the problem... I noticed that all the content was rendered inside of the script tag:

inspect html

The reason is, becaues the script element was missing it's closing tag.


Fix:

<script type="text/javascript" src='{{ URL::asset("js/main.js") }}'></script>