idtyu's avatar
Level 1

Lumen not rendering paths properly in HTML

Hi:

I am using Lumen 5.2 . I am trying to add a lightweight HTML console on top of my Lumen API, and so I tried to add Jquery and bootstrap, and I route it using route.php, like:

$app->get('/manage', function () {
    return view('console');
});

and then add in Javascript like this:

 <script src="https://code.jquery.com/jquery-3.1.1.min.js" type="text/javascript"></script>

and like this:(I added a helper function for public_path and stuff like that)

   <img class="logo" src='{{public_path('images/logo.png')}}'>

However, the image will return a 401 and not loading, same with the external js, which returns a 401 as well,

and vendor css has another problem:

Resource interpreted as Stylesheet but transferred with MIME type application/json: "http://localhost:8000/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css".

How do I fix this? Thanks.

0 likes
0 replies

Please or to participate in this conversation.