kJamesy / laravel-vue-starter

A Laravel & VueJS starter
36 stars 10 forks source link

Whoops, looks like something went wrong. #1

Closed AngelinCalu closed 7 years ago

AngelinCalu commented 7 years ago

What should this return ? explode( $_SERVER['SERVER_NAME'], route('admin.settings'))[1]

I get the error: explode(): Empty delimiter (View: .... /laravel-vue-starter/resources/views/dashboard/dashboard_settings.blade.php)

Fixed it by replacing the explode() function with str_replace():

baseUri: '{{ str_replace(url('/'), '', route('admin.settings')) }}',

kJamesy commented 7 years ago

Glad you found a fix. This was only necessary for localhost/app kinda setups where /some-route didn't map correctly from within Vue. Not needed when proper domain is set up.