AlexNastase

Experience

10,480

0 Best Reply Awards

  • Member Since 2 Years Ago
  • 170 Lessons Completed
  • 4 Favorites

8th September, 2017

AlexNastase left a reply on Vue Laravel And Laravel Passport • 2 months ago

Thank you andreasbakir and ZetecVan. I will double check the documentation.

AlexNastase started a new conversation Vue Laravel And Laravel Passport • 2 months ago

Hi guys,

I am trying to undestad how to create a SPA (has users, posts, comments etc.) with Vue 2 - Laravel 5.5 and Passport. Do i need two diferent web apps. One client ( Vue and Laravel ) and one server ( Laravel Passport )?

Thank you.

27th July, 2017

AlexNastase left a reply on Laravel Mix - Jquery Not Loading In Blade @section • 3 months ago

I think i have found the problem. In my assets/js/app.js i was missing this line window.$ = window.jQuery = require('jquery');

After adding the code, the problem solved.

AlexNastase started a new conversation Laravel Mix - Jquery Not Loading In Blade @section • 3 months ago

Hi guys,

I have a problem with loading jQuery in a blade section.

Problem: ReferenceError: $ is not defined

webpack.mix.js

const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
    .extract([
        'jquery', 
        'devbridge-autocomplete',
        'bootstrap-sass', 
        'sweetalert',
        'dropzone',
        'jquery-bar-rating'
    ])
    .autoload({
        jquery: ['$', 'window.jQuery', 'jQuery', 'jquery']
    })
    .sass('resources/assets/sass/app.scss', 'public/css')
    .sourceMaps();

app.blade.php

    <script src="{{ mix('/js/manifest.js') }}"></script>
    <script src="{{ mix('/js/vendor.js') }}"></script>
    <script src="{{ mix('/js/app.js') }}"></script>
    @yield('scripts')

show.blade.php

@section('scripts')
<script type="text/javascript">
     $( document ).ready(function() {
            console.log( "ready!" );
        });
</script>
@endsection

In older Laravel versions it just worked, but in Laravel 4.5 not...

Any ideea?

Thank you.

24th July, 2017

AlexNastase left a reply on Laravel Mix - ReferenceError: Dropzone Is Not Defined • 3 months ago

It works!

Thank you, TiBian.

AlexNastase started a new conversation Laravel Mix - ReferenceError: Dropzone Is Not Defined • 3 months ago

Laravel Framework 5.4.28

Why the Dropzone class is not loaded from public/js/vendor.js ?

Here is my webpack.mix.js const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js') .extract([ 'jquery', 'devbridge-autocomplete', 'bootstrap-sass', 'sweetalert', 'dropzone' ]) .autoload({ jquery: ['$', 'window.jQuery', 'jQuery', 'jquery'] }) .sass('resources/assets/sass/app.scss', 'public/css') .sourceMaps();

In app.blade.php i have added:

Here is the resources/assets/js/app.js

var myDropzone = new Dropzone("div#myId", { url: "/file/post"});

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.