0 Best Reply Awards

  • Member Since 1 Year Ago
  • 15 Lessons Completed
  • 1 Favorite

15th November, 2017

xsigns left a reply on Get Path From Storage Directory In Vue Component • 10 months ago

I really dont get it.. Can you explain it a bit more? If I pass props['/path/to/storage'], I actually have a the same as a regular string like imagePath: '/path/to/storage' or do you mean to pass it by vue-router?

14th November, 2017

xsigns started a new conversation Get Path From Storage Directory In Vue Component • 10 months ago

I need to get the path from /storage/app/public for a image in a .vue component, while using vue-loader.

<img :src="'/storage/app/public' + user.imageFromDb" /> If I go that way, I can't get the image path. But if I try to get an image path from /public/img, it will work like a charme.

I want to store all uploads in the /storage directory, and I'm using the laravel Storage::disk('myDisk')->makeDirectory('path/' . $path); method.

Is there a possibility to get the path in a clean way? Maybe something like that

export default {
  data function() {
      imagePath: '/path/to/storage' + this.user.imageFromDb

7th September, 2017

xsigns started a new conversation Laravel With Vue-router In History Mode - Page Reloads On Every Click On The Router-link (a) • 1 year ago

Hi *, I'm trying to use the vue-router 2.7 with vue 2.4.2 and laravel 5.4. This works so far. I want to use history mode to get rid of the #. My setup is:

window.Vue = require('vue');
import VueRouter from 'vue-router';
import router from './router';


where router.js is

import VueRouter    from 'vue-router'

//Define route components
const Home = { template: '<div>home</div>' }
const Foo = { template: '<div>channels</div>' }
const Bar = { template: '<div>protocol</div>' }

// lazy load components
const Room = (resolve) => require(['./components/Channels.vue'], resolve);

export default new VueRouter({
    mode: 'history',
    base: __dirname,
    routes: [
        //{ path: '/', component: Home },
        { path: '/channels', component: Foo },
        { path: '/protocol', component: Bar },
        { path: '/rooms', component: Room } // example of route with a seperate component

I have a route in laravels web.php catching the ajax-requests, but it vue-routers request doesn't seem to bee an ajax request:

Route::group(['middleware' => 'auth'], function () {

    //check whether vue-router is making the request
        Route::get('/{vue?}', function() {
            if ( ! Request::ajax() )
                return view('intern');
        })->where('vue', '[\/\w\.-]*');

The page is reloaded every time. What is my error? Thanks for your help in advance! André

21st August, 2017

xsigns left a reply on Module Not Found: Error: Can't Resolve 'fs' • 1 year ago

Hi, did you solve this? How?

Edit Your Profile

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