Laravel Failed to Load vendor resource from server?

MarkusEx

I am trying to get emoji on my textarea in Laravel. I have the problem that the Plugin which I got from Github doesn't get loaded to the web. I followed every instruction.

I get the respond:

emojionearea.min.js

  • Failed to load resource: the server responded with a status of 404 (Not Found)

emojionearea.min.css

  • Failed to load resource: the server responded with a status of 404 (Not Found)

And this lead to an type error because it doesn't find the Plugin.

I have really no clue I tried to clear the cache, autoload-dump and also tried to publish. Also tried to access in Blade with HTML, URL and ASSET but nothing has worked out for me. My Thought on this is that it is caused because it is in the Vendor folder and not in the public folder.

I am working on macos and I am using Mamp.

// web.php
Route::get('emojiTest', function () {
    return view('emojioneareaTest');
});

// emojioneareaTest.blade.php
<!doctype html>
<html lang="en">

<head>
    <title>emojionearea by mervick</title>
    <link rel="stylesheet" href="vendor/mervick/emojionearea/dist/emojionearea.min.css">
    <script type="text/javascript" src="vendor/mervick/emojionearea/dist/emojionearea.min.js"></script>

</head>

<body>
    <textarea class="emoji"></textarea>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        window.onload = function() {
            if (window.jQuery) {
                // jQuery is loaded
                alert("Yeah!");
            } else {
                // jQuery is not loaded
                alert("Doesn't Work");
            }
        }
        $(document).ready(function() {
            $(".emoji").emojioneArea({
                pickerPosition: "right",
                tonesStyle: "bullet"
            });
        });
    </script>
</body>

</html>


PATH to the Plugin

- Project
 - Vendor
  - mervick
   - emojionearea
    - dist
     - emojionearea.min.css
     - emojionearea.min.js

The expected result should be, I'm able to get the emojis. Right know I can't try out the package. Also if I am not to far of I would like if you guys can give me a inside if the I am trying to get emojis is the industrial way.

I hope you guys can help me to resolve this problem.

farooq

The files outside of the public directory are not available over HTTP (since public is the server's Document Root). You have one option .

  • Move the both css and js files into /public folder and access it by using
<link rel="stylesheet" href="{{ asset('css/emojionearea.min.css') }}">

and for js file

<script src="{{asset('js/emojionearea.min.js')}}" type="text/javascript"></script>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Javascript

Failed to load resource: the server responded with a status of 404 (Not Found)

From Java

Spring Boot Failed to load resource: the server responded with a status of 404

From Dev

Failed to load resource: the server responded with a status of 421 (Bad Request)

From Dev

Apache Cordova: Failed to load resource: the server responded with a status of 404 (Not Found)

From Dev

Failed to load resource: the server responded with a status of 401 for mapbox api

From Dev

Failed to load resource: the server responded with a status of 504 (Gateway Timeout)

From Dev

webpack dev server Failed to load resource

From Dev

Glide failed to load resource

From Dev

Angular 5: Failed to load resource: the server responded with a status of 404

From Dev

Failed to load resource: the server responded with a status of 404 (Not Found) when trying to fetch data from json

From Dev

Failed to load resource: the server responded with a status of 504 (Timeout while reading response from Server) Node.js,Nginx

From Dev

calling .net core method from angular gives error: failed to load resource: the server responded with a status of 404 ()

From Dev

Moving laravel vendor to server

From Dev

Failed to load COMPASS resource: the server responded with a status of 404 (Not Found)

From Dev

Failed to load .js resource

From Dev

IDEA Failed to load resource

From Dev

Laravel Chained Select Failed to load resource: the server responded with a status of 500

From Dev

PHP failed to load vendor folder : How to install composer on my server?

From Dev

Failed to load resource: the server responded with a status of 404 (Not Found). with ajax in caph

From Dev

Failed to load resource: the server responded with a status of 403 (Forbidden) MVC 5

From Dev

Failed to load resource: the server responded with a status of 500 (Internal Server Error) while returning image in base64 format from controller

From Dev

Failed to load resource; the server responded with a status of 404 - bundles/jquery - MVC

From Dev

Angular 2 - Failed to load resource: the server responded with a status of 404 (Not Found)

From Dev

LARAVEL Failed to load resource: the server responded with a status of 404 (Not Found)

From Dev

failed to load resource: the server response with a status 500 (internal server error)

From Dev

Failed to load resource in HTML

From Dev

GlideException: Failed to load resource

From Dev

Failed to load resource: the server responded with 404

From Dev

Failed to load resource: the server responded with a status of 400 (Bad Request) solution?

Related Related

  1. 1

    Failed to load resource: the server responded with a status of 404 (Not Found)

  2. 2

    Spring Boot Failed to load resource: the server responded with a status of 404

  3. 3

    Failed to load resource: the server responded with a status of 421 (Bad Request)

  4. 4

    Apache Cordova: Failed to load resource: the server responded with a status of 404 (Not Found)

  5. 5

    Failed to load resource: the server responded with a status of 401 for mapbox api

  6. 6

    Failed to load resource: the server responded with a status of 504 (Gateway Timeout)

  7. 7

    webpack dev server Failed to load resource

  8. 8

    Glide failed to load resource

  9. 9

    Angular 5: Failed to load resource: the server responded with a status of 404

  10. 10

    Failed to load resource: the server responded with a status of 404 (Not Found) when trying to fetch data from json

  11. 11

    Failed to load resource: the server responded with a status of 504 (Timeout while reading response from Server) Node.js,Nginx

  12. 12

    calling .net core method from angular gives error: failed to load resource: the server responded with a status of 404 ()

  13. 13

    Moving laravel vendor to server

  14. 14

    Failed to load COMPASS resource: the server responded with a status of 404 (Not Found)

  15. 15

    Failed to load .js resource

  16. 16

    IDEA Failed to load resource

  17. 17

    Laravel Chained Select Failed to load resource: the server responded with a status of 500

  18. 18

    PHP failed to load vendor folder : How to install composer on my server?

  19. 19

    Failed to load resource: the server responded with a status of 404 (Not Found). with ajax in caph

  20. 20

    Failed to load resource: the server responded with a status of 403 (Forbidden) MVC 5

  21. 21

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) while returning image in base64 format from controller

  22. 22

    Failed to load resource; the server responded with a status of 404 - bundles/jquery - MVC

  23. 23

    Angular 2 - Failed to load resource: the server responded with a status of 404 (Not Found)

  24. 24

    LARAVEL Failed to load resource: the server responded with a status of 404 (Not Found)

  25. 25

    failed to load resource: the server response with a status 500 (internal server error)

  26. 26

    Failed to load resource in HTML

  27. 27

    GlideException: Failed to load resource

  28. 28

    Failed to load resource: the server responded with 404

  29. 29

    Failed to load resource: the server responded with a status of 400 (Bad Request) solution?

HotTag

Archive