mstdmstd

Experience

3,530

0 Best Reply Awards

  • Member Since 10 Months Ago
  • 1 Lesson Completed
  • 0 Favorites

22nd February, 2018

mstdmstd left a reply on How To Use Laravel In Vuejs Admin Dasboard • 3 hours ago

Thank youi for explanations!

I have some expierence with webpack and laravel-mix, but maybe not much.

I want to try to make working adminify project, as I am interested in backend templates it provides.

I tried to follow you instructions and now in my package.json:

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },

    "dependencies": {
        "adonis-websocket-client": "^1.0.2",
        "babel-runtime": "^6.23.0",
        "i": "^0.3.5",
        "indicative": "^2.2.1",
        "vue": "^2.3.3",
        "vue-i18n": "^6.1.1",
        "vue-quill-editor": "^2.1.6",
        "vue-router": "^2.3.1",
        "vue-timeago": "^3.3.1",
        "vue2-dropzone": "^2.0.0"
    },
    
    "devDependencies": {
        "axios": "^0.18",
        "bootstrap": "^4.0.0",
        "popper.js": "^1.12",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^2.0",
        "lodash": "^4.17.4",
        "vue": "^2.5.7",


        "Validator": "^1.0.4",
        "autoprefixer": "^6.7.2",
        "axios-mock-adapter": "^1.8.1",
        "babel-core": "^6.22.1",
        "babel-eslint": "^7.1.1",
        "babel-loader": "^6.2.10",
        "babel-plugin-transform-runtime": "^6.22.0",
        "babel-preset-env": "^1.3.2",
        "babel-preset-stage-2": "^6.22.0",
        "babel-register": "^6.22.0",
        "chalk": "^1.1.3",
        "connect-history-api-fallback": "^1.3.0",
        "copy-webpack-plugin": "^4.0.1",
        "css-loader": "^0.28.0",
        "eslint": "^3.19.0",
        "eslint-config-standard": "^6.2.1",
        "eslint-friendly-formatter": "^2.0.7",
        "eslint-loader": "^1.7.1",
        "eslint-plugin-html": "^2.0.0",
        "eslint-plugin-promise": "^3.4.0",
        "eslint-plugin-standard": "^2.0.1",
        "eventsource-polyfill": "^0.9.6",
        "express": "^4.14.1",
        "extract-text-webpack-plugin": "^2.0.0",
        "file-loader": "^0.11.1",
        "friendly-errors-webpack-plugin": "^1.1.3",
        "html-webpack-plugin": "^2.28.0",
        "http-proxy-middleware": "^0.17.3",
        "indicative": "^2.2.1",
        "mockjs": "^1.0.1-beta3",
        "opn": "^4.0.2",
        "optimize-css-assets-webpack-plugin": "^1.3.0",
        "ora": "^1.2.0",
        "pug": "^2.0.0-rc.1",
        "rimraf": "^2.6.0",
        "semver": "^5.3.0",
        "shelljs": "^0.7.6",
        "style-loader": "^0.13.1",
        "stylus": "^0.54.5",
        "stylus-loader": "^2.1.1",
        "url-loader": "^0.5.8",
        "vue-loader": "^12.1.0",
        "vue-style-loader": "^3.0.1",
        "vue-template-compiler": "^2.3.3",
        "vuetify": "^0.14",
        "vuex": "^2.3.1",
        "webpack": "^2.6.1",
        "webpack-bundle-analyzer": "^2.2.1",
        "webpack-dev-middleware": "^1.10.0",
        "webpack-hot-middleware": "^2.18.0",
        "webpack-merge": "^4.1.0"

    }
}

I run one more time : $ composer update and

$ npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN ajv-[email protected] requires a peer of [email protected]^6.0.0 but none was installed.

But I am not sure had I to run them ?

But I got next errros:

$ npm run dev

> @ dev /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating
> npm run development


> @ development /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 78% advanced chunk optimization/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:188
            chunk.sortModules();
                  ^

TypeError: chunk.sortModules is not a function
    at /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:188:19
    at /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/async/dist/async.js:3096:16
    at eachOfArrayLike (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/async/dist/async.js:1055:9)
    at eachOf (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/async/dist/async.js:1103:5)
    at Object.eachLimit (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/async/dist/async.js:3158:5)
    at Compilation.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:184:27)
    at Compilation.applyPluginsAsyncSeries (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/tapable/lib/Tapable.js:206:13)
    at Compilation.seal (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/webpack/lib/Compilation.js:579:8)
    at /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/webpack/lib/Compiler.js:493:16
    at /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/tapable/lib/Tapable.js:289:11
    at _addModuleChain (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/webpack/lib/Compilation.js:481:11)
    at processModuleDependencies.err (/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/node_modules/webpack/lib/Compilation.js:452:13)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

npm ERR! Linux 4.13.0-36-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
npm ERR! node v6.11.4
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/npm-debug.log

npm ERR! Linux 4.13.0-36-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v6.11.4
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script 'npm run development'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/npm-debug.log

I have in my system :

 php artisan --version
Laravel Framework 5.6.4
$ node -v 
v6.11.4
$ npm -v 
3.5.2

I am not sure as for node and npm versions ?

20th February, 2018

mstdmstd left a reply on How To Use Laravel In Vuejs Admin Dasboard • 2 days ago

  1. Thank you for your answer, trying to follow your instructions I installed
npm install
   
npm run dev 

npm install --save  pug

the last command I did as I got errors that package pug was not found

After I run :

 npm run watch-poll     

And got next errors:

> @ watch-poll /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating
> npm run watch -- --watch-poll


> @ watch /mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch-poll"

 10% building modules 1/1 modules 0 active                                         
Webpack is watching the files…

 95% emitting                                                                          

 ERROR  Failed to compile with 16 errors                                                                                                                                                                                           5:50:06 PM

These dependencies were not found:

* @/config in ./resources/assets/js/i18n/index.js
* @/styles/main.styl in ./resources/assets/js/main.js
* Validator in ./resources/assets/js/main.js
* adonis-websocket-client in ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/pages/Chat.vue
* i in ./resources/assets/js/helper.js
* vue-i18n in ./resources/assets/js/i18n/index.js
* vue-quill-editor in ./resources/assets/js/main.js
* vue-timeago in ./resources/assets/js/main.js
* vue-timeago/locales in ./resources/assets/js/main.js
* vue-timeago/locales/en-US.json in ./resources/assets/js/main.js
* vue2-dropzone in ./resources/assets/js/main.js
* vuetify in ./resources/assets/js/main.js
* vuetify/src/stylus/main.styl in ./resources/assets/js/main.js
* vuetify/src/stylus/settings/_colors.styl in ./resources/assets/js/main.js
* vuex in ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/pages/Main.vue, ./resources/assets/js/store/index.js

To install them, you can run: npm install --save @/config @/styles/main.styl Validator adonis-websocket-client i vue-i18n vue-quill-editor vue-timeago vue-timeago/locales vue-timeago/locales/en-US.json vue2-dropzone vuetify vuetify/src/stylus/main.styl vuetify/src/stylus/settings/_colors.styl vuex
       Asset    Size  Chunks                    Chunk Names
 /js/main.js  555 kB       0  [emitted]  [big]  /js/main
/css/app.css  187 kB       0  [emitted]         /js/main

WARNING in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-0727ce06","hasScoped":false,"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/components/Grid.vue
(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to <template> to denote scoped slots.
 @ ./resources/assets/js/components/Grid.vue 6:23-260
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

WARNING in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-63b0f0e1","hasScoped":false,"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/template-compiler/preprocessor.js?engine=pug!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/pages/CrudGrid.vue
(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to <template> to denote scoped slots.
 @ ./resources/assets/js/pages/CrudGrid.vue 6:23-346
 @ ./resources/assets/js/pages ^\.\/.*\.vue$
 @ ./resources/assets/js/router.js
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/i18n/index.js
Module not found: Error: Can't resolve '@/config' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js/i18n'
 @ ./resources/assets/js/i18n/index.js 2:0-30
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/main.js
Module not found: Error: Can't resolve '@/styles/main.styl' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js'
 @ ./resources/assets/js/main.js 19:0-28
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/main.js
Module not found: Error: Can't resolve 'Validator' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js'
 @ ./resources/assets/js/main.js 39:0-34
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/pages/Chat.vue
Module not found: Error: Can't resolve 'adonis-websocket-client' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js/pages'
 @ ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/pages/Chat.vue 21:0-41
 @ ./resources/assets/js/pages/Chat.vue
 @ ./resources/assets/js/pages ^\.\/.*\.vue$
 @ ./resources/assets/js/router.js
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/helper.js
Module not found: Error: Can't resolve 'i' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js'
 @ ./resources/assets/js/helper.js 3:0-26
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/i18n/index.js
Module not found: Error: Can't resolve 'vue-i18n' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js/i18n'
 @ ./resources/assets/js/i18n/index.js 3:0-31
 @ ./resources/assets/js/main.js
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

ERROR in ./resources/assets/js/main.js
Module not found: Error: Can't resolve 'vue-quill-editor' in '/mnt/_work_sdb8/wwwroot/lar/ArtistsSongsRating/resources/assets/js'
 @ ./resources/assets/js/main.js 34:0-46
 @ multi ./resources/assets/js/main.js ./resources/assets/sass/app.scss

As far as I can see the issue with

the "scope" attribute for...

that is because of different version of vue components in this backend template and in installed vue.js in laravel.

And many errors like :

Can't resolve '@/config'...

Is it possible/easy to fix? I have been learning vue.js last 2-3 monthes, that seems rather complicated for me...

  1. Are there some laravel (>=5.5)/vue.js(>=2.5) Backend templates based on vuetify components? can you advice some?

Thanks!

19th February, 2018

mstdmstd started a new conversation How To Use Laravel In Vuejs Admin Dasboard • 3 days ago

Hello, I am interested in this admin dasboard https://github.com/wxs77577/adminify and after installing I have a project with structure

$ ls -l
total 237
drwxrwxrwx 1 root root   4096 лют 17 13:31 build
drwxrwxrwx 1 root root      0 лют 17 13:31 config
-rwxrwxrwx 1 root root    324 лют 17 13:31 CONTRIBUTING.md
-rwxrwxrwx 1 root root    803 лют 17 13:31 index.html
-rwxrwxrwx 1 root root   1087 лют 17 13:31 LICENSE
drwxrwxrwx 1 root root 131072 лют 17 13:34 node_modules
-rwxrwxrwx 1 root root   2678 лют 17 13:31 package.json
drwxrwxrwx 1 root root      0 лют 17 13:31 public
-rwxrwxrwx 1 root root   6645 лют 17 13:31 README.md
drwxrwxrwx 1 root root   4096 лют 17 13:31 screenshots
drwxrwxrwx 1 root root   4096 лют 17 13:32 src
drwxrwxrwx 1 root root      0 лют 17 13:31 static
-rwxrwxrwx 1 root root  75607 лют 17 13:31 WechatGroup.png

If there is a way to use/install laravel 5 for API of this crud? I would like to use asll the power of laravel 5 (controls, models,migrations etc...).

If yes, which step have I to do ?

Thanks!

16th February, 2018

mstdmstd started a new conversation How To Open Block By Default In Vue2-collapse • 6 days ago

Hello, In my laravel5.5/vuejs2.5 application I use vue2-collapse component( https://roszpun.github.io/vue-collapse/#/?id=getting-started ) It works, but what I missed how to set some <v-collapse-wrapper> block opened by default ?

I docs I found :

Every wrapper components stores necessary data properties, which can be used at some point while extending plugin to own needs.
...
status  {Boolean}   The status of the component. Status decides whether element is toggled or not.

So I used syntax like:

                        <v-collapse-group :onlyOneActive="true">
                                
                            <v-collapse-wrapper  :status="false">
                                <div class="header a_link" v-collapse-toggle>
                                    <h4>Today</h4>
                                </div>
                                <div class="" v-collapse-content >
                                    ...
                                </div>
                            </v-collapse-wrapper>

                            <v-collapse-wrapper :status="true">
                                <div class="header a_link" v-collapse-toggle>
                                    <h4>Tomorrow</h4>
                                </div>
                                <div class="" v-collapse-content>
                                    ...
                                </div>
                            </v-collapse-wrapper>


                        </v-collapse-group>

But anyway none of my blocks was opened by default? Is there an error in the syntax ?

Thanks!

13th February, 2018

mstdmstd started a new conversation Error In Opening Of Block With Content • 1 week ago

Hello, In my laravel5.5/vuejs2.5 application I need to make listing of Weather Locations and any of them has collapse icon clicking on which I want to open block with content of any of Weather Location. in my component with userWeatherLocationBlockIsVisibleArray array, having reference to any weather Location with index and if content of any clock is visible: I do like :

                this.userWeatherLocationBlockIsVisibleArray::{{ userWeatherLocationBlockIsVisibleArray }};;;<hr>
                <ul class="user-weather-locations-list">
                    <li v-for="nextUserWeatherLocation, index in userWeatherLocationsList"  >
                    
                        ...
                        <a data-toggle="a_link" v-on:click="toggleUserWeatherLocationBlockIsVisible(nextUserWeatherLocation.id)" >
                            <i class="indicator glyphicon glyphicon-hand-down" style="font-size:14px;" ></i>
                        </a> <!-- Switcher if to show block below -->

                        <div :class="{ 'collapse row ':true, 'in': userWeatherLocationBlockIsVisibleArray[index].visible , 'out':!userWeatherLocationBlockIsVisibleArray[index].visible }" >
                            <h1>id:{{ userWeatherLocationBlockIsVisibleArray[index] }}     OPENED  BLOCK WITH CONTENT</h1>
                        </div>

                    </li>
                </ul>
                ...
                
<script>
    export default {

        data: function () {
            return {            
                userWeatherLocationBlockIsVisibleArray:[],
                ...
            }

        }, // data: function () {


                
        methods: {
            loadUserWeatherLocationsList() {
                axios.get(window.API_VERSION_LINK + '/user_weather_location_load').then((response) => {
                    this.userWeatherLocationsList = response.data.userWeatherLocationsList;
                    this.userWeatherLocationsList.map( ( nextUserWeatherLocation, index )=> {
                        var nextItem = { 'id': nextUserWeatherLocation.id, visible : false }
                        this.userWeatherLocationBlockIsVisibleArray[ this.userWeatherLocationBlockIsVisibleArray.length ] = nextItem;
                    }); <!--For any weather location set flag in this.userWeatherLocationBlockIsVisibleArray -->
                    ...
                }).catch((error) => {
                ...
                });

            }, // loadUserWeatherLocationsList() {
           ...
           
            toggleUserWeatherLocationBlockIsVisible(id) {   <!-- Switcher function to show block of content -->
                this.userWeatherLocationBlockIsVisibleArray.map( ( nextWeatherLocationBlockIsVisible, index )=> {

                    if ( id == nextWeatherLocationBlockIsVisible.id ) {
                        console.log("INSIDE id::")  <!-- In console I see this block-->
                        console.log( id )

                        <!-- Switcher of clicked item-->
                        this.userWeatherLocationBlockIsVisibleArray[index].visible = !this.userWeatherLocationBlockIsVisibleArray[index].visible;
                    }
                });


                console.log("+++toggleUserWeatherLocationBlockIsVisible this.userWeatherLocationBlockIsVisibleArray::")
                console.log( this.userWeatherLocationBlockIsVisibleArray )
                <!-- In console I see that my changes were applied -->

            },

With methods above my block I switch on is not opened. In view debugging https://imgur.com/a/k4Tch

I see that toggleUserWeatherLocationBlockIsVisible visible property is changed ( point 1 at image ), when I click on the icon of the second item ( point 3 at image ), but I output userWeatherLocationBlockIsVisibleArray array( point 2 at image ) and see that it content is not changed. Why my block is not opened? Can it be that in toggleUserWeatherLocationBlockIsVisible somewhow created new copy of userWeatherLocationBlockIsVisibleArray and how to fix it?

Thanks!

11th February, 2018

mstdmstd started a new conversation The Code Is NOT Highlighted With Parameters In Component • 1 week ago

Hello, In my laravel5.5/vuejs2.5 application I want to highlight some files and I have highlight.js installed with next in my package.json:

  "dependencies": {
    "highlight.js": "^9.12.0",

In my resources/assets/js/app.js I define route:

import SourceViewer from './components/lib/SourceViewer.vue';

...

const routes = [
    {
        path: '/',
        components: {
            ...
            sourceViewer: SourceViewer,
            ...
        }
     ...
     }   
    {path: '/admin/source_viewer/:filename/:ext', component: SourceViewer, name: 'sourceViewer'},
    ...

and the component itself resources/assets/js/components/lib/SourceViewer.vue :

<template>
   <section>

      <div class="panel-heading">
         <div v-if="message" class="text-danger col-xs-12">
            <center>{{ message }}</center>
         </div>
         source_filename::{{ source_filename }}<br>
         source_ext::{{ source_ext }}<br>


         <div>
            <pre><code class="php">{{ file_content }}</code></pre>
         </div>
      </div>

   </section>

</template>

<script>
    import appMixin from '../../appMixin';

    export default {

        data: function () {
            return {

                source_filename: 'app/Http/Controllers/DashboardController.php',
                source_ext: 'php',

                file_content: '',
                message: '',
            }
        }, // data: function () {

        mixins: [appMixin],

        created() {
        },

        mounted() {
            this.loadSourceFile()
        }, // mounted() {

        methods: {

            loadSourceFile() {
                this.message = '';

                var filename = this.$route.params.filename
                var ext = this.$route.params.ext

                console.log(typeof filename)
                console.log(typeof ext)

                if (typeof filename != 'undefined' && typeof ext != 'undefined') {
                    this.source_filename = filename.toString()
                    this.source_ext = ext.toString()
                    console.log("PARAMETERS ARE CHANGED FROM URL filename::" + filename)
                    console.log("ext::" + ext)
                }
                console.log("parameters would be applied: this.source_filename::" + (this.source_filename) + "  this.source_ext::" + this.source_ext)
                axios.post(window.API_VERSION_LINK + '/get_source_file', {'src_file': this.source_filename, 'file_type': this.source_ext}).then((response) => {
                    this.file_content = response.data.file_content
                    this.message = ''

                    let hljs = require('highlight.js');
                    console.log("hljs::")
                    console.log(hljs)

                    hljs.initHighlightingOnLoad();     // https://www.laravel-vuejs.com/vue-js-syntax-highlighting-with-highlight-js/
                    console.log("after initLineNumbersOnLoad::")


                    this.showPopupMessage('The source of the file was loaded', 'success');
                }).catch((error) => {
                    this.is_page_updating = false
                    this.showPopupMessage('Error loading the source of the file.', 'error');
                    this.showRunTimeError(error, this);
                });


            }, // loadSourceFile() {

        }, // methods: {


    }


</script>

The thing is that when I call this component without filename parameter as:

<source-viewer ></source-viewer>

It works ok, file's content is retrieved, set to this.file_content var and the code highlighted. In this case default file set in source_filename variable is retrieved.

But I need to show different files in this component and setting filename as parameter :

    <router-link :to="{ name: 'sourceViewer', params: { filename: 'app/Http/Controllers/DashboardController.php', ext: 'php' } }" >Open</router-link>

page with url

http://local-tasks.com/admin/test#/admin/source_viewer/app%2FHttp%2FControllers%2FDashboardController.php/php

is opened, and I see that variables source_filename and source_ext are set with values in parameter and content of the file is uploaded. I see text in console :

PARAMETERS ARE CHANGED FROM URL filename::app/Http/Controllers/DashboardController.php
ext::php
parameters would be applied: this.source_filename::app/Http/Controllers/DashboardController.php  this.source_ext::php

so parameters were applied and file's content is applied , but the code is NOT highlighted at all ! I do not see the difference and why so? How to fix it? Thanks!

8th February, 2018

mstdmstd left a reply on Error With Default Route Parameter • 2 weeks ago

Thank you for your advice, it looks good, but when I try to get 1 item like:

tasks/id

looks like it is confused with

tasks/{filter}

Can you advice simple/effective way to deal it ?

mstdmstd started a new conversation Error With Default Route Parameter • 2 weeks ago

Hello, In my laravel5.5/vuejs2.5 application I define resource in routes/web.php filter as :

    Route::resource('tasks/{filter}', 'TasksController', ['except' => ['create', 'edit']])->middleware('WorkTextString');

And in app/Http/Controllers/TasksController.php I have default filter :

<?php

namespace App\Http\Controllers;

use Auth;
...

class TasksController extends MyAppController
{
    use funcsTrait;


    public function index($filter= '')
    {

But I got error:

Route pattern "/admin/tasks/{filter}/{{filter}}" cannot reference variable name "filter" more than once.

even when I do not use this route...

Why this error and how to fix it?

Thanks!

3rd February, 2018

mstdmstd left a reply on How Extend Font-awesome Plugin • 2 weeks ago

Thank you! Could you please give a ref to full list of accessible icons? I found this https://fontawesome.com/icons?d=gallery, but testing found that some icons in this list ( like chart-pie, chess-pawn ) are not supported in my app

mstdmstd left a reply on How Extend Font-awesome Plugin • 2 weeks ago

Could you please to clarify mix.js - is it webpack.mix.js or node_modules/laravel-mix/src/Mix.js or /node_modules/laravel-mix/setup/webpack.mix.js ?

31st January, 2018

mstdmstd left a reply on How Extend Font-awesome Plugin • 3 weeks ago

I mean more of icons accessible for my app.

mstdmstd started a new conversation How Better Call Components • 3 weeks ago

Hello, In my laravel5.5/vue.js2.5 application I have some components used in some pages. Say in resources/assets/js/app.js I have next component called :

...
window.Vue = require('vue');
...
Vue.component( 'editor-header',  require( './components/lib/EditorHeader.vue') );
...

This is component used, say in 4 *.vue-files from my 30 *.vue-files in under resources/assets/js/components/ subdirectory.

Which way is preferable from the point of logics/site productivity/support to put once line

Vue.component( 'editor-header',  require( './components/lib/EditorHeader.vue') );

in resources/assets/js/app.js - and it would be accessible in all pages

or to insert calling of my components only in the *.vue files, when I use it?

Thanks!

30th January, 2018

mstdmstd started a new conversation How Extend Font-awesome Plugin • 3 weeks ago

Hello, Installing font-awesome plugin I can use awesome icons from here https://getbootstrap.com/docs/3.3/components/.

If there is a way to extend these icons list(especcially with social media icons, as twitter...)

Thanks!

29th January, 2018

mstdmstd left a reply on How Set Js/components/lib/StatusLine.vue In Resources/views/layouts/app.blade.php ? • 3 weeks ago

I am not sure what do you mean?

Code

"?dt=".time()

I used to clear my browser's cache...

Anyway removing it:

<script src="/js/app.js"></script>
<status-line></status-line>

the same problem, status-line is not triggere at all...

mstdmstd left a reply on How Set Js/components/lib/StatusLine.vue In Resources/views/layouts/app.blade.php ? • 3 weeks ago

  1. I have command
npm run watch-poll

run in my console

  1. I remade and My resources/assets/js/app.js has next :
require('./bootstrap');
require('jquery');
require('jquery-confirm');


 window.Vue = require('vue');

import VueRouter from 'vue-router';

import VueTimeago from 'vue-timeago'  // https://github.com/egoist/vue-timeago
Vue.use(VueTimeago, {
   ...
})


import Vue from 'vue';
import Element from 'element-ui'

import VueTreeNavigation from 'vue-tree-navigation'; //https://github.com/MisRob/vue-tree-navigation
Vue.use(VueTreeNavigation);

import VeeValidate from 'vee-validate'; // http://vee-validate.logaretm.com/  ,  http://vee-validate.logaretm.com/examples.html
...

Vue.component( 'tree-view-listing',  require( './components/lib/TreeViewListing') );
Vue.component( 'status-line',  require( './components/lib/StatusLine.vue') );
...

As my mentioned above status-line works ok when it is inserted in another vue file. It does not called(I added alert in mount event - it is not alerted) when inserted in resources/views/layouts/app.blade.php...

mstdmstd started a new conversation How Set Js/components/lib/StatusLine.vue In Resources/views/layouts/app.blade.php ? • 3 weeks ago

Hello,

In my laravel 5.5/vue.js 2.5 application I have resources/assets/js/components/lib/StatusLine.vue file as my status line functionality and inserting it into the footer of any my .vue file it works ok.

But In my application I have common layout file resources/views/layouts/app.blade.php, with structure like :

<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    ...

</head>
<body>
    <div id="app">


        <nav class="navbar navbar-default navbar-static-top">
        ...
        
        
       
        </nav>

        @yield('content')
    </div> <!-- id="app">-->


    <!-- Scripts -->


    <script src="{{ asset('js/app.js'    ) }}{{  "?dt=".time()  }}"></script>
    <script src="{{ asset('js/debug.js'    ) }}{{  "?dt=".time()  }}"></script>
    <script src="{{ asset('js/moment.min.js'    ) }}{{  "?dt=".time()  }}"></script>
    <script src="{{ asset('js/jquery/jquery-confirm.min.js') }}"></script>

    <status-line></status-line>

</body>


</html>

The component is defined in my resources/assets/js/app.js :

window.Vue.component( 'status-line',  require( './components/lib/StatusLine.vue') );

But status-line component is not visible at all. Is it possible to insert my vuejs component in common template to be visible on all pages and if yes how?

Thanks!

27th January, 2018

mstdmstd left a reply on Keep Content Of Template In Vue File? • 3 weeks ago

Thank you for your response and the link you provided, but looks like it is a bit different I asked I need link to the vue file in template: descriptor of the component description. Could you, please, give a link to a similar example?

26th January, 2018

mstdmstd started a new conversation Keep Content Of Template In Vue File? • 3 weeks ago

Hello, In my laravel 5.5/vue 2.5 application I made treeview based on vuejs examples as in In resources/assets/js/app.js I defined component as:

// define the treeview-item component
Vue.component('treeview-item', {
    template:
    '  <li>\n' +
    ...
    '  </li>\n'   ,
    props: {
        treeItemData: Object
    },
    data: function () {
        return {
        ...
        }
    },
    computed: {
    ...

It works ok, but if there is a way to keep content of template in separate vue file ? I tried as :

       template: require('./components/Tree.vue'),
        ...

But got error:

[Vue warn]: invalid template option:[object Object]
found in
---> <TreeviewItem>

resources/assets/js/components/Tree.vue :

<template>

  <li>
  ...
  </li>

</template>

Which is the correct way ?

Thanks!

24th January, 2018

mstdmstd left a reply on With Storage To Check If The Directory Is Empty • 4 weeks ago

I got error :

"Class 'App\Filesystem' not found

I am not sure which class have I to use in the control? It it installed by default?

mstdmstd started a new conversation With Storage To Check If The Directory Is Empty • 4 weeks ago

Hello, Deleting a file using Storage(Laravel 5.5) with file name

Storage::delete($filename_path);

which is the best way to check if the directory after deleting of the file is empty and delete it too? as I do not need empty directory? Thanks!

23rd January, 2018

mstdmstd left a reply on Error With Dropbox Api • 4 weeks ago

Hello, I still search for a decision, as I still have an error:

This driver does not support retrieving URLs.

when I try to get shared url of uploaded file.

I created a small application, repeating the error I have. Public url: https://www.dropbox.com/s/rmclue63tyeyu1w/dropbox_demo.zip?dl=0

Under home url there is “Run drop box” menu item and clicking on it the routing would be run. I output to the console all related variables.

I hardcoded app's key/secret in the HomeController.php and in the config/app.php files. If there is no error in the code, please, try to run under your dropbox creditials. Could it be misconfiguration on dropbox side of my account?

Thank you for your time!

19th January, 2018

mstdmstd started a new conversation How To Sanitize Data With Axios In Laravel5.5/vue.js App • 1 month ago

Hello,

Using axios in laravel5.5/vue.js 2.5 application I see that posted data are not sanitized at all. Which is the best policy to clear/check posted data and save only safe data?

https://getbootstrap.com/docs/3.3/components/ Thanks!

18th January, 2018

mstdmstd left a reply on Try To Implement Tree-view Example With Error • 1 month ago

As I still search for a decision, if there is some kind of jsfiddle for laravel/vue.js projects?

17th January, 2018

mstdmstd left a reply on Try To Implement Tree-view Example With Error • 1 month ago

I tried to fix it , but I have the same error anyway. Looks like all data is not visible in

<script type="text/x-template" id="item-template">
...
</script>

block.

Which layout for such template must be valid in this case?

12th January, 2018

mstdmstd started a new conversation Try To Implement Tree-view Example With Error • 1 month ago

Hello, I try to implement tree-view from this https://vuejs.org/v2/examples/tree-view.html sample to my laravel 5.5/vue.js application. In resources/assets/js/app.js I added lines :

// define the item component
Vue.component('item', {
    template: '#item-template',
    props: {
        model: Object
    },
    data: function () {
        return {
            open: false
        }
    },
    computed: {
        isFolder: function () {
            return this.model.children &&
                this.model.children.length
        }
    },
    methods: {
        toggle: function () {
            if (this.isFolder) {
                this.open = !this.open
            }
        },
        changeType: function () {
            if (!this.isFolder) {
                Vue.set(this.model, 'children', [])
                this.addChild()
                this.open = true
            }
        },
        addChild: function () {
            this.model.children.push({
                name: 'new stuff'
            })
        }
    }
})


window.Vue.use(VueRouter);

In my listing file resources/assets/js/components/tasks/TasksIndex.vue I add item template declaration and calling the root element of the item:

<template>
   <section>
        ...

         <!-- the demo root element -->

<!-- item template -->
<script type="text/x-template" id="item-template">
  <li>

    <div
      :class="{bold: isFolder}"
      @click="toggle"
      @dblclick="changeType">
      {{model.name}}
      <span v-if="isFolder">[{{open ? '-' : '+'}}]</span>
    </div>

    <ul v-show="open" v-if="isFolder">

      <item
        class="item"
        v-for="model in model.children"
        :model="model">
      </item>

      <li class="add" @click="addChild">+</li>
    </ul>
  </li>
</script>

            treeData::{{ treeData }}
            <ul id="demo">
               <item class="item" :model="treeData">
               </item>
            </ul>
        ...

   </section>
</template>




<script>
    import appMixin from '../../appMixin';

    // demo data
    var dataArray = {
        name: 'My Tree',
        children: [
            { name: 'hello' },
            { name: 'wat' },
            {
                name: 'child folder',
                children: [
                    {
                        name: 'child folder',
                        children: [
                            { name: 'hello' },
                            { name: 'wat' }
                        ]
                    },
                    { name: 'hello' },
                    { name: 'wat' },
                    {
                        name: 'child folder',
                        children: [
                            { name: 'hello' },
                            { name: 'wat' }
                        ]
                    }
                ]
            }
        ]
    };

    export default {
        data: function () {
            return {
                header_title : 'Tasks',
                ...
                treeData:  dataArray
                ...
            }

        },

        mixins : [appMixin],

        created() {
        },

        mounted() {
            this.loadTasksList()
        }, // mounted() {

        methods: {

            
        }
    }
</script>


<style scoped lang="css">
.item {
   cursor: pointer;
}
.bold {
   font-weight: bold;
}
ul {
   padding-left: 1em;
   line-height: 1.5em;
   list-style-type: dot;
}
</style>

And In console of my browser I see error :

Vue warn]: Property or method "model" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <TasksIndex> at resources/assets/js/components/tasks/TasksIndex.vue
 "TypeError: Cannot read property 'name' of undefined"
found in
---> <TasksIndex> at resources/assets/js/components/tasks/TasksIndex.vue
       <Root>
  1. What I did not understabd in which part of my pages have I to install
<script type="text/x-template" id="item-template">
...
</script>
code block?
  1. Why have I error with model ? I suppose “model” that is property of “item” object and I send treeData to it. Is it because of question 1)?

Thanks!

7th January, 2018

mstdmstd started a new conversation Errors Installing Vue-simple-table • 1 month ago

Hello, In my laravel 5.5 / vuejs 2.5 I try to use https://cukikt0302.github.io/vue-simple-table/index.html library. In console I run commands to install related packages and got some errors:

$ npm install @xunlei/vue-context-menu
/mnt/_work_sdb8/wwwroot/lar/tasks
├── @xunlei/[email protected]  extraneous
├── [email protected]  extraneous
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]  extraneous
├── [email protected] 
└── [email protected]  extraneous

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of [email protected]^1.0.21 but none was installed.
$ npm install --save uiv vue-simple-table
/mnt/_work_sdb8/wwwroot/lar/tasks
├── @xunlei/[email protected]  extraneous
├── [email protected]  extraneous
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]  extraneous
├── [email protected] 
└── [email protected]  extraneous

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of [email protected]^1.0.21 but none was installed.
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 13 updates, 0 removals
  - Updating symfony/finder (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/http-foundation (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/event-dispatcher (v4.0.2 => v4.0.3): Downloading (100%)         
  - Updating symfony/debug (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/http-kernel (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/process (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/routing (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/var-dumper (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/console (v3.4.2 => v3.4.3): Loading from cache
  - Updating psy/psysh (v0.8.16 => v0.8.17): Loading from cache
  - Updating phpunit/phpunit-mock-objects (5.0.5 => 5.0.6): Loading from cache
  - Updating symfony/css-selector (v3.4.2 => v3.4.3): Loading from cache
  - Updating symfony/translation (v3.4.2 => v3.4.3): Loading from cache                                                                                                                                                                      
Writing lock file                                                                                                                                                                                                                            
Generating optimized autoload files                                                                                                                                                                                                          
> Illuminate\Foundation\ComposerScripts::postAutoloadDump                                                                                                                                                                                    
> @php artisan package:discover                                                                                                                                                                                                              
Discovered Package: fideloper/proxy                                                                                                                                                                                                          
Discovered Package: barryvdh/laravel-debugbar                                                                                                                                                                                                
Discovered Package: laracasts/utilities                                                                                                                                                                                                      
Discovered Package: laravel/dusk                                                                                                                                                                                                             
Discovered Package: spatie/laravel-backup                                                                                                                                                                                                    
Discovered Package: intervention/image                                                                                                                                                                                                       
Discovered Package: laravel/tinker                                                                                                                                                                                                           
Package manifest generated successfully.                   

I do not know if these errors are critical? especially that

UNMET PEER DEPENDENCY [email protected]

which is in red in my console? Have I to fix it and how?

I inserted the code from the demo page in my page and the component is not rendered at all. But no errors in console...

Thanks!

2nd January, 2018

mstdmstd started a new conversation How To Create The Minimum Laravel Project For Help Asking • 1 month ago

Hallo, Sometimes when I need to get help on this site a piece of code provided by me is not enough. I think to create the minimum laravel project with the issue I have, to upload it on github and to ask the members of this site to test it on their side.

  1. Which kind of project must it be and which files(directories) have I to provide ?
  2. Is it within rules of this site?

Thanks!

28th December, 2017

mstdmstd started a new conversation Errors In My Console After Installing Of After Installing Element-ui • 1 month ago

Hello, After installing element-ui into my laravel 5.5 application npm update vue npm i element-ui -S

I worked for some time, but from new session I got o lot of errors in my console, like:

ERROR in ./resources/assets/js/components/user_profiles/UserProfilesEdit.vue
Module build failed: Error: 

Vue packages version mismatch:

- [email protected]
- [email protected]

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using [email protected]>=10.0, simply update vue-template-compiler.
If you are using [email protected]<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

    at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/tasks/node_modules/vue-template-compiler/index.js:8:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/tasks/node_modules/vue-loader/lib/parser.js:1:80)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/tasks/node_modules/vue-loader/lib/loader.js:3:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/tasks/node_modules/vue-loader/index.js:1:80)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
 @ ./resources/assets/js/app.js 80:0-79
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

I have :

$ php artisan --version
Laravel Framework 5.5.28
[email protected]:/mnt/_work_sdb8/wwwroot/lar/tasks$ composer show
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
barryvdh/laravel-debugbar             v3.1.0  PHP Debugbar integration for Laravel
dnoegel/php-xdg-base-dir              0.1     implementation of xdg base directory specification for php
doctrine/annotations                  v1.6.0  Docblock Annotations Parser
doctrine/cache                        v1.7.1  Caching library offering an object-oriented API for many cache backends
doctrine/collections                  v1.5.0  Collections Abstraction library
doctrine/common                       v2.8.1  Common Library for Doctrine projects
doctrine/dbal                         v2.6.3  Database Abstraction Layer
doctrine/inflector                    v1.2.0  Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                 1.1.0   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                        v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
egulias/email-validator               2.1.3   A library for validating emails against several RFCs
erusev/parsedown                      1.6.4   Parser for Markdown.
facebook/webdriver                    1.5.0   A PHP client for Selenium WebDriver
fideloper/proxy                       3.3.4   Set trusted proxies for Laravel
filp/whoops                           2.1.14  php error handling for cool kids
fzaninotto/faker                      v1.7.1  Faker is a PHP library that generates fake data for you.
guzzlehttp/psr7                       1.4.2   PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php                 v2.0.0  This is the PHP port of Hamcrest Matchers
intervention/image                    2.4.1   Image handling and manipulation library with support for Laravel integration
jakub-onderka/php-console-color       0.1    
jakub-onderka/php-console-highlighter v0.3.2 
laracasts/utilities                   3.0     Transform your PHP to JavaScript
laravel/dusk                          v2.0.8  Laravel Dusk provides simple end-to-end testing and browser automation.
laravel/framework                     v5.5.28 The Laravel Framework.
laravel/tinker                        v1.0.3  Powerful REPL for the Laravel framework.
league/flysystem                      1.0.41  Filesystem abstraction: Many filesystems, one API.
maximebf/debugbar                     v1.14.1 Debug bar in the browser for php application
mockery/mockery                       1.0     Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework...
monolog/monolog                       1.23.0  Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/cron-expression             v1.2.1  CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
myclabs/deep-copy                     1.7.0   Create deep copies (clones) of your objects
nesbot/carbon                         1.22.1  A simple API extension for DateTime.
nikic/php-parser                      v3.1.3  A PHP parser written in PHP
paragonie/random_compat               v2.0.11 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phar-io/manifest                      1.0.1   Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                       1.0.1   Library for handling version information and constraints
phpdocumentor/reflection-common       1.0.1   Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock     4.2.0   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver           0.4.0  
phpspec/prophecy                      1.7.3   Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage             5.3.0   Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator             1.4.5   FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template             1.2.1   Simple template engine.
phpunit/php-timer                     1.0.9   Utility class for timing
phpunit/php-token-stream              2.0.2   Wrapper around PHP's tokenizer extension.
phpunit/phpunit                       6.5.5   The PHP Unit Testing framework.
phpunit/phpunit-mock-objects          5.0.5   Mock Object library for PHPUnit
psr/container                         1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/http-message                      1.0.1   Common interface for HTTP messages
psr/log                               1.0.2   Common interface for logging libraries
psr/simple-cache                      1.0.0   Common interfaces for simple caching
psy/psysh                             v0.8.16 An interactive shell for modern PHP.
pusher/pusher-php-server              v3.0.1  Library for interacting with the Pusher REST API
ramsey/uuid                           3.7.1   Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
sebastian/code-unit-reverse-lookup    1.0.1   Looks up which function or method a line of code belongs to
sebastian/comparator                  2.1.1   Provides the functionality to compare PHP values for equality
sebastian/diff                        2.0.1   Diff implementation
sebastian/environment                 3.1.0   Provides functionality to handle HHVM/PHP environments
sebastian/exporter                    3.1.0   Provides the functionality to export PHP variables for visualization
sebastian/global-state                2.0.0   Snapshotting of global state
sebastian/object-enumerator           3.0.3   Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector            1.1.1   Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context           3.0.0   Provides functionality to recursively process PHP variables
sebastian/resource-operations         1.0.0   Provides a list of PHP built-in functions that operate on resources
sebastian/version                     2.0.1   Library that helps with managing the version number of Git-hosted PHP projects
spatie/db-dumper                      2.8.1   Dump databases
spatie/laravel-backup                 5.1.2   A Laravel 5 package to backup your application
spatie/temporary-directory            1.1.3   Easily create, use and destroy temporary directories
swiftmailer/swiftmailer               v6.0.2  Swiftmailer, free feature-rich PHP mailer
symfony/console                       v3.4.2  Symfony Console Component
symfony/css-selector                  v3.4.2  Symfony CssSelector Component
symfony/debug                         v3.4.2  Symfony Debug Component
symfony/event-dispatcher              v4.0.2  Symfony EventDispatcher Component
symfony/finder                        v3.4.2  Symfony Finder Component
symfony/http-foundation               v3.4.2  Symfony HttpFoundation Component
symfony/http-kernel                   v3.4.2  Symfony HttpKernel Component
symfony/polyfill-mbstring             v1.6.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php70                v1.6.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/process                       v3.4.2  Symfony Process Component
symfony/routing                       v3.4.2  Symfony Routing Component
symfony/translation                   v3.4.2  Symfony Translation Component
symfony/var-dumper                    v3.4.2  Symfony mechanism for exploring and dumping PHP variables
theseer/tokenizer                     1.1.0   A small library for converting tokenized PHP source code into XML and potentially other formats
tijsverkoyen/css-to-inline-styles     2.2.0   CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.
vlucas/phpdotenv                      v2.4.0  Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
wboyz/laravel-enum                    v0.2.1  Base enum class with some features.
webmozart/assert                      1.2.0   Assertions to validate method input/output with nice error messages.

My composer.json :

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "doctrine/dbal": "^2.6",
        "fideloper/proxy": "~3.3",
        "intervention/image": "^2.4",
        "laracasts/utilities": "^3.0",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "pusher/pusher-php-server": "^3.0",
        "spatie/laravel-backup": "^5.1",
        "wboyz/laravel-enum": "^0.2.1"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.1",
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "laravel/dusk": "^2.0",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

I am not sure if there is a way to fix it and how ?

Thanks!

21st December, 2017

mstdmstd started a new conversation Search For "site Is Under Construction" Functionality Tool? • 2 months ago

Hello,

Could you, please, give referrence to some laravel5.5 Extension/tool "Site is under construction" functionality ?

Thanks!

19th December, 2017

mstdmstd started a new conversation Valid Construction For Plugin Creation • 2 months ago

Hello,

In laravel 5.5/vue.js2.5 application I want to add some plugin. I read in docs that plugina are prefereable then mixings, as plugin would be used only when I need it.

In my resources/assets/js/app.js I add plugin definition:

Vue.use(VueSweetAlert)
export const bus = new Vue();
new Vue({ router,

    data:{
        app_title: 'AAAAaAAA',
        ...
    },


    methods: {
        ...
    }, // methods: {


    created() {
        ...
    }, // created() {

    mounted(){
        ...
    }, // mounted(){

} ).$mount('#app')  // new Vue({ router,


Vue.filter('concat_str', function (str) {
    if ( str.length > settings_max_str_length_in_listing ) {
        return str.slice(0, settings_max_str_length_in_listing) + '...';
    }
    return str;
});




MyPlugin.install = function (Vue, options) {
    Vue.prototype.getNowDateTime = function () {
        var current_ts = Date.now() /  1000 | 0;
        alert( "getNowDateTime current_ts::"+var_dump(current_ts) )
        return current_ts;
    }
}

Vue.use(MyPlugin)


But in console I geo error:
ReferenceError: MyPlugin is not defined
    at Object.<anonymous>...

Could you, please, give a reference to valid construction for plugin creation, as I need to use plugin's methods in resources/assets/js/app.js file and in *.vue files of my project? Is it better to have separate .js/.vue file for my plugin?

Thanks!

17th December, 2017

mstdmstd left a reply on Problems Installing Laravel-backup Extention • 2 months ago

My config/laravel-backup.php :

<?php
Use App\Settings;
$site_name= 'Loan import';


return [

    'backup' => [

        /*
         * The name of this application. You can use this name to monitor
         * the backups.
         */
        'name' => $site_name,

        'source' => [

            'files' => [

                /*
                 * The list of directories that should be part of the backup. You can
                 * specify individual files as well.
                 */
                'include' => [
                    base_path().'/public/upload/__CSV_DATA/',
                    base_path().'/public/upload/csv/',
                    base_path().'/app/',
                    base_path().'resources/views/'
                ],

                /*
                 * These directories will be excluded from the backup.
                 * You can specify individual files as well.
                 */
                'exclude' => [
//                    base_path('vendor'),
//                    base_path('node_modules'),
//                    storage_path(),
                ],

                /*
                 * Determines if symlinks should be followed.
                 */
                'followLinks' => false,
            ],

            /*
             * The names of the connections to the databases that should be part of the backup.
             * Currently only MySQL- and PostgreSQL-databases are supported.
             */
            'databases' => [
                'pgsql',
            ],
        ],

        'destination' => [

            'filename_prefix' => 'csvp_acrhive_',
            /*
             * The disk names on which the backups will be stored.
             */
            'disks' => [
                'local',
            ],
        ],
    ],

    'cleanup' => [
        /*
         * The strategy that will be used to cleanup old backups.
         * The youngest backup will never be deleted.
         */
        'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,

        'defaultStrategy' => [

            /*
             * The amount of days that all backups must be kept.
             */
            'keepAllBackupsForDays' => 7,

            /*
             * The amount of days that all daily backups must be kept.
             */
            'keepDailyBackupsForDays' => 16,

            /*
             * The amount of weeks of which one weekly backup must be kept.
             */
            'keepWeeklyBackupsForWeeks' => 8,

            /*
             * The amount of months of which one monthly backup must be kept.
             */
            'keepMonthlyBackupsForMonths' => 4,

            /*
             * The amount of years of which one yearly backup must be kept.
             */
            'keepYearlyBackupsForYears' => 2,

            /*
             * After cleaning up the backups remove the oldest backup until
             * this amount of megabytes has been reached.
             */
            'deleteOldestBackupsWhenUsingMoreMegabytesThan' => 5000
        ]
    ],


    /*
     *  In this array you can specify which backups should be monitored.
     *  If a backup does not meet the specified requirements the
     *  UnHealthyBackupWasFound-event will be fired.
     */
    'monitorBackups' => [
        [
            'name' => env('APP_URL'),
            'disks' => ['local'],
            'newestBackupsShouldNotBeOlderThanDays' => 1,
            'storageUsedMayNotBeHigherThanMegabytes' => 5000,
        ],

        /*
        [
            'name' => 'name of the second app',
            'disks' => ['local', 's3'],
            'newestBackupsShouldNotBeOlderThanDays' => 1,
            'storageUsedMayNotBeHigherThanMegabytes' => 5000,
        ],
        */
    ],

    'notifications' => [

        /*
         * This class will be used to send all notifications.
         */
        'handler' => Spatie\Backup\Notifications\Notifier::class,

        /*
         * Here you can specify the ways you want to be notified when certain
         * events take place. Possible values are "log", "mail", "slack",
         * "pushover", and "telegram".
         *
         * Slack requires the installation of the maknz/slack package.
         * Telegram requires the installation of the irazasyed/telegram-bot-sdk package.
         */
        'events' => [
            'whenBackupWasSuccessful'     => ['log'],
            'whenCleanupWasSuccessful'    => ['log'],
            'whenHealthyBackupWasFound'   => ['log'],
            'whenBackupHasFailed'         => ['log', 'mail'],
            'whenCleanupHasFailed'        => ['log', 'mail'],
            'whenUnhealthyBackupWasFound' => ['log', 'mail'],
        ],

        /*
         * Here you can specify how emails should be sent.
         */
        'mail' => [
            'from' => '[email protected]',
            'to'   => '[email protected]',
        ],

        /*
         * Here you can specify how messages should be sent to Slack.
         */
        'slack' => [
            'channel'  => '#backups',
            'username' => 'Backup bot',
            'icon'     => ':robot:',
        ],

        /*
         * Here you can specify how messages should be sent to Pushover.
         */
        'pushover' => [
            'token'  => env('PUSHOVER_APP_TOKEN'),
            'user'   => env('PUSHOVER_USER_KEY'),
            'sounds' => [
                'success' => env('PUSHOVER_SOUND_SUCCESS', 'pushover'),
                'error'   => env('PUSHOVER_SOUND_ERROR', 'siren'),
            ],
        ],

        /*
         * Here you can specify how messages should be sent to Telegram Bot API.
         */
        'telegram' => [
            'bot_token' => env('TELEGRAM_BOT_TOKEN'),
            'chat_id'   => env('TELEGRAM_CHAT_ID'),
            'async_requests' => env('TELEGRAM_ASYNC_REQUESTS', false),
            'disable_web_page_preview' => env('TELEGRAM_DISABLE_WEB_PAGE_PREVIEW', true),
        ],
    ]
];

and in config/database.php:

<?php

return [
    'connections' => [


        'mysql' => [
        ...
        ],

        'pgsql' => [ // my DB I work with
            'driver' => 'pgsql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'prefix' => 'cs_',
            'schema' => 'public',
            'sslmode' => 'prefer',
        ],

which Authentication did I miss?

16th December, 2017

mstdmstd left a reply on Problems Installing Laravel-backup Extention • 2 months ago

Thanks, I updated the pluging and running in my console I got:

$ sudo php artisan backup:run
[sudo] password for serge: 
Starting backup...
Dumping database tasks...
Determining files to backup...
Zipping 937 files...
Created zip containing 937 files. Size is 4.33 MB
Copying zip to disk named local...
Successfully copied zip to disk named local.
Copying zip failed because: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
".                                                                                                                                                                                                                                           
Backup failed because Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
".                                                                                                                                                                                                                                           
#0 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(317): Swift_Transport_AbstractSmtpTransport->assertResponseCode('530 5.7.1 Authe...', Array)                       
#1 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(272): Swift_Transport_AbstractSmtpTransport->executeCommand('MAIL FROM:<hell...', Array, Array)                           
#2 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(348): Swift_Transport_EsmtpTransport->executeCommand('MAIL FROM:<hell...', Array)                                         
#3 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(452): Swift_Transport_EsmtpTransport->doMailFromCommand('[email protected]')                                      
#4 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(480): Swift_Transport_AbstractSmtpTransport->doMailTransaction(Object(Swift_Message), '[email protected]', Array, Array)                                                                                                                                                                                                                                       
#5 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(189): Swift_Transport_AbstractSmtpTransport->sendTo(Object(Swift_Message), '[email protected]', Array, Array)     
#6 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(73): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#7 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(451): Swift_Mailer->send(Object(Swift_Message), Array)
#8 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(235): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#9 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php(64): Illuminate\Mail\Mailer->send(Object(Illuminate\Support\HtmlString), Array, Object(Closure))
#10 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(113): Illuminate\Notifications\Channels\MailChannel->send(Object(Spatie\Backup\Notifications\Notifiable), Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#11 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(89): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(Spatie\Backup\Notifications\Notifiable), '6a50c7c7-b8a7-4...', Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed), 'mail')
#12 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(64): Illuminate\Notifications\NotificationSender->sendNow(Array, Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#13 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(35): Illuminate\Notifications\NotificationSender->send(Array, Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#14 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send(Object(Spatie\Backup\Notifications\Notifiable), Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#15 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Notifications/EventHandler.php(33): Spatie\Backup\Notifications\Notifiable->notify(Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#16 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(349): Spatie\Backup\Notifications\EventHandler->Spatie\Backup\Notifications\{closure}(Object(Spatie\Backup\Events\BackupHasFailed))
#17 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(200): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('Spatie\Backup\E...', Array)
#18 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(465): Illuminate\Events\Dispatcher->dispatch('Spatie\Backup\E...')
#19 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(255): event(Object(Spatie\Backup\Events\BackupHasFailed))
#20 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(247): Spatie\Backup\Tasks\Backup\BackupJob->sendNotification(Object(Spatie\Backup\Events\BackupHasFailed))
#21 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Support/Collection.php(337): Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}(Object(Spatie\Backup\BackupDestination\BackupDestination), 0)
#22 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(249): Illuminate\Support\Collection->each(Object(Closure))
#23 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(137): Spatie\Backup\Tasks\Backup\BackupJob->copyToBackupDestinations('/mnt/_work_sdb8...')
#24 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(49): Spatie\Backup\Tasks\Backup\BackupJob->run()
#25 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#26 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#27 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#28 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#29 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#30 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Illuminate\Container\Container->call(Array)
#31 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/symfony/console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#32 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#33 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(22): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/symfony/console/Application.php(936): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/symfony/console/Application.php(240): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 /mnt/_work_sdb8/wwwroot/lar/tasks/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /mnt/_work_sdb8/wwwroot/lar/tasks/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 {main}
Backup failed because: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
".

In AbstractSmtpTransport.php line 419:
                                                                                                  
  Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required  
  "                                                                                               

I have kubuntu 17.10.

I run the command under root user(code above) and non root user. Could you give me a hint what is this error and how to fix it?

mstdmstd left a reply on How To Integrate Dropbox In Filesystem? • 2 months ago

Hello, Having similar problems I googled and found this post. Looking at this doc https://laravel.com/docs/5.5/filesystem#retrieving-files

I managed to put a file to dropbox storage, but failed to get its url. I did like :

$exists = Storage::disk('dropbox')->exists($dest_dropbox_file_name);
echo '<pre>$exists::'.print_r($exists,true).'</pre>';  // Value is 1

$url = Storage::disk('dropbox')->url($dest_dropbox_file_name);
echo '<pre>$url::'.print_r($url,true).'</pre>';

I got error:

RuntimeException
This driver does not support retrieving URLs.

Did you find right way to get shared url ?

mstdmstd left a reply on Who Worked With Vue-strap ? • 2 months ago

Hello, I found another library http://element.eleme.io/#/en-US/component/quickstart. If you worked with it, what do you think about it or similar libs?

14th December, 2017

mstdmstd started a new conversation Who Worked With Vue-strap ? • 2 months ago

Hello, I found an examples with vue-strap library https://wffranco.github.io/vue-strap/

which has:

 This repository contains a set of native Vue.js components based on Bootstrap's markup and CSS. As a result no dependency on jQuery or Bootstrap's JavaScript is required. The only required dependencies are:

    Vue.js (required ^2.1.x, test with 2.1.6).
    Bootstrap CSS (required 3.x.x, test with 3.3.6). VueStrap doesn't depend on a very precise version of Bootstrap. Just pull the latest. 

Who worked with it? Is it good for my Laravel5(v5.5.24)/vue.js2(v2.5.8)/ application ? Maybe there are some better libraries like that?

Thanks!

13th December, 2017

mstdmstd left a reply on Error With Dropbox Api • 2 months ago

Thank you for the link!

I tried to make :

$exists = Storage::disk('dropbox')->exists($dest_dropbox_file_name);

and got error :

Driver [dropbox] is not supported.

In my config/filesystems.php I have :

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
        ],


        's3' => [
            'driver' => 's3',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
        ],

        'dropbox' => [
            'driver' => 'dropbox',
            'authorizationToken' => env('DROPBOX_OATH'),
            'appSecret' => env('DROPBOX_SECRET'),
        ],

But I have the same error. I am not sure as for keys of the 'dropbox' subarray, as I googled and found dofferent keys here... But I ma sure that DROPBOX_OATH and DROPBOX_SECRET are valid, as I managed to upload file at dropbox...

What did I miss in dropbox configuration or was it error in my code?

11th December, 2017

mstdmstd left a reply on Error With Dropbox Api • 2 months ago

Sorry, I still search for the decision on how to get public reference to the uploaded file. On the link above to the blog I did not find if there is a to get the public reference and is on this blog any place where I can ask my question on the same?

Who use Laravel 5 for files uploading to drop box? Which tool do you use?

8th December, 2017

mstdmstd left a reply on Error With Dropbox Api • 2 months ago

Thank you for the link!

With Header declaration :

use League\Flysystem\Filesystem;
use Spatie\Dropbox\Client;
use Spatie\FlysystemDropbox\DropboxAdapter;

I wrote :

            $dropboxClient = new Client(env('DROPBOX_OATH'));
            $adapter = new DropboxAdapter($dropboxClient);
            $filesystem = new Filesystem($adapter);
            $uploaded = $filesystem->put($dest_dropbox_file_name, $file, []);

and a file is uploaded to the dropbox in the path/directory in $dest_dropbox_file_name. But I want to get public reference to the uploaded file.

Variable $uploaded - is boolean value. The prior menthioned methods

$links['share'] = $dropboxClient->createShareableLink($dest_dropbox_file_name);
$links['view'] = $dropboxClient->createTemporaryDirectLink($dest_dropbox_file_name);

do not work... Which the right way ?

7th December, 2017

mstdmstd left a reply on Problems Installing Laravel-backup Extention • 2 months ago

My composer.json :

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "doctrine/dbal": "^2.5",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "league/flysystem-dropbox": "^1.0",
        "maatwebsite/excel": "~2.1.0",
        "mcamara/laravel-localization": "^1.3",
        "rcrowe/twigbridge": "^0.9.5",
        "sebastiansulinski/dotenv": "^2.0",
        "sebastiansulinski/php-backup": "^2.0",
        "spatie/flysystem-dropbox": "^1.0",
        "spatie/laravel-backup": "^3.0.0"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

It has no spatie/db-dumper .

mstdmstd left a reply on Error With Dropbox Api • 2 months ago

Thank you for your response! I made as written here : https://github.com/spatie/flysystem-dropbox and added at the top of my controller :

use League\Flysystem\Filesystem;
use Spatie\Dropbox\Client;
use Spatie\FlysystemDropbox\DropboxAdapter;

and in my flow:

$client = new Client( env('DROPBOX_OATH') );
$adapter = new DropboxAdapter($client);
$filesystem = new Filesystem($adapter);

and I got error pointing at the first row above :

Type error: Argument 2 passed to Spatie\Dropbox\Client::__construct() must be an instance of GuzzleHttp\Client or null, string given, called in /mnt/_work_sdb8/wwwroot/lar/csvp/app/TmpCsvp.php on line ...

Which parameter must be the second parameter? Also I am not sure as for the first parameter. is it DROPBOX_OATH or an array I dot on dropbox site ?

Thanks!

6th December, 2017

mstdmstd started a new conversation Problems Installing Laravel-backup Extention • 2 months ago

Hello, Having :

 php -v
PHP 7.1.8-1ubuntu1 (cli) (built: Aug  8 2017 15:57:37) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.8-1ubuntu1, Copyright (c) 1999-2017, by Zend Technologies
$ php artisan --version
Laravel Framework 5.5.23

I tried to install laravel-backup and got:

$ composer require spatie/laravel-backup
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Using version ^5.1 for spatie/laravel-backup
./composer.json has been updated
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/serge/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install spatie/laravel-backup 5.1.2
    - Conclusion: don't install spatie/laravel-backup 5.1.1
    - Conclusion: remove spatie/db-dumper 1.5.1
    - Installation request for spatie/laravel-backup ^5.1 -> satisfiable by spatie/laravel-backup[5.1.0, 5.1.1, 5.1.2].
    - Conclusion: don't install spatie/db-dumper 1.5.1
    - spatie/laravel-backup 5.1.0 requires spatie/db-dumper ^2.7 -> satisfiable by spatie/db-dumper[2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0, 2.8.1].
    - Can only install one of: spatie/db-dumper[2.7.0, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.7.1, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.7.2, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.7.3, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.7.4, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.8.0, 1.5.1].
    - Can only install one of: spatie/db-dumper[2.8.1, 1.5.1].
    - Installation request for spatie/db-dumper (locked at 1.5.1) -> satisfiable by spatie/db-dumper[1.5.1].

Installation failed, reverting ./composer.json to its original content.

I am not sure which steps have I to do install laravel-backup? Is it possible?

If not can you advice some similar extention ?

Thank you!

mstdmstd started a new conversation Error With Dropbox Api • 2 months ago

Hello,

To work with dropbox using laravel 5.5 I tried http://itsolutionstuff.com/post/laravel-5-dropbox-api-file-upload-example-using-league-flysystem-dropbox-packageexample.html extension.

I created the application on the dropbox and using its tokens I get an error:

HTTP status 400 {"error": "v1_retired"}

Googling found that something like this extension was based on api version 1, which is out of date now. The reason is this? If so, what would you recommend for working with api version 2?

Thank you!

4th December, 2017

mstdmstd left a reply on Saving Db And Having Error Catch Block Does Not Work As I Expect • 2 months ago

Hello, I still search for decision... Which errors flow do you use in your applications when working with API controls? Please, share piece of code or link to example code...

mstdmstd started a new conversation Saving Db And Having Error Catch Block Does Not Work As I Expect • 2 months ago

Hello, In laravel 5.5/vuejs/mysql Application I use try block in my control to save my data like:

public function store(UserChatRequest $request)
{
    try {
        DB::beginTransaction();

        $insertDataArray           = $request->all();
        
        $insertDataArray['manager_nonexisting_field_id'] = $new_user_chat_manager_id;  // A reference to nonexisting field
        $newUserChat                   = UserChat::create($insertDataArray);
        ...

        DB::commit();
    } catch (Exception $e) {

        DB::rollBack();
        return response()->json(['error_code' => 1, 'error_message' => $e->getMessage(), 'userChat' => null], HTTP_RESPONSE_INTERNAL_SERVER_ERROR);
    }

    return response()->json(['error_code' => 0, 'error_message' => '', 'userChat' => $newUserChat], HTTP_RESPONSE_OK_RESOURCE_CREATED);
}

I expect having error catch block would work and error would be returned in error_message structure, but in console of my browser I see original error returned: https://imgur.com/a/8TljZ Why catch block did not work and how to fix it?

Thanks!

2nd December, 2017

mstdmstd left a reply on Pagination Implementation In Laravel 5.5/vue.js App • 2 months ago

I suppose that I have in file resources/assets/js/app.js file to add line :

...
import UserChatsEdit from './components/user_chats/UserChatsEdit.vue'; 
import SimplePagination from './components/SimplePagination.vue'; // ref to the pagination


const routes = [
    {
        path: '/',
        components: {
            tasksIndex: TasksIndex,                      /* router-view name in .vue file : imported reference to .vue file */
            user_task_typesIndex: UserTaskTypesIndex,
            user_chatsIndex: UserChatsIndex,
        }
    },
...

Is it so ?

But in console I see next :

       Asset    Size  Chunks                    Chunk Names
  /js/app.js  1.5 MB       0  [emitted]  [big]  /js/app
/css/app.css  150 kB       0  [emitted]         /js/app

WARNING in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-60f5633c","hasScoped":false,"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0&bustCache!./resources/assets/js/components/user_task_types/UserTaskTypesIndex.vue
(Emitted value instead of an instance of Error) the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to <template> to denote scoped slots.
 @ ./resources/assets/js/components/user_task_types/UserTaskTypesIndex.vue 6:23-290
 @ ./resources/assets/js/app.js
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

I have

  • Vue.js v2.5.8

Looks like you component is not compatible with my Vue.js( I have Laravel Framework 5.5.21 )... Is it easy to fix it ? Sorry, I am rather new in vue...

mstdmstd left a reply on Pagination Implementation In Laravel 5.5/vue.js App • 2 months ago

Thank you! Very interesting! Has it some demo live ?

mstdmstd started a new conversation Pagination Implementation In Laravel 5.5/vue.js App • 2 months ago

Hello, I search for pagination implementation in laravel 5.5/vue.js app on mysql-based data. I googled and tried some examples : but they were did not workable or to complicated for me. If possible with live demo or tutorial ...

Thanks!

1st December, 2017

mstdmstd started a new conversation Exists Validation With Null Value? • 2 months ago

Hello, In laravel 5.5 in mysql user_chat table I have task_id field, which can be null, so writing a rule, like:

'task_id'      => 'exists:tasks,id',

it works as required, if in control I write

$dataArray= $request->all();
if (empty($dataArray['task_id'])) $dataArray['task_id']= null; // task_id was not selected 
$userChat->update($dataArray);

If there is a way in validation to skip null value here ?

Thanks!

28th November, 2017

mstdmstd left a reply on To Pass Configuration Variables In App.js And *.vue Files • 2 months ago

Sorry, I still search for decision. Are there some online examples which could be shared ?

27th November, 2017

mstdmstd started a new conversation Run Sample Project In Laravel 5.4 • 2 months ago

Hello, Somethimes I upload examples with Laravel and want to look at them how they working. Usually I have to do next with sample project:

    Clone the repository with git clone
    
    Copy .env.example file to .env and edit database credentials there
    
    composer install
 
    php artisan key:generate
    
    php artisan migrate
    
    npm install
   
   npm run dev 
   
   php artisan serve

But as current version is Laravel 5.5 I got Laravel 5.5 project.

If in source of file is written Laravel 5.4 which steps have I to do and what for to pay attention at?

I mean I dislike idea to change possible errors because of differen t version and to to set project of verson I need?

Thanks!

Edit Your Profile
Update

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