Closed cretueusebiu closed 6 years ago
hello why removed middleware code form source code ?
Hi, don't think new layout system is a good idea, for example if I have a search bar in top menu and inputted something, old layout system will keep it when I go to next page in same layout, only "child" component will be updated.
It's also not good for performance, even next page have same layout, all elements in body need to generate again.
In my opinions, this change make layout system worse than before.
@redaced It was removed from routes.js
and you have to define it on the component level in order to fix an issue when you click back in your browser and the layout was not changing correctly.
@yeungc You're right about the layout, it's back now. Didn't thought about that. The problem with layouts not changing when you go back was from how the middleware worked before. But it's fixed now.
+1 for the Guide. Understanding how a template works is critical to its usefulness.
@cretueusebiu .. is there any guide, please ?
could i use this project as a web with vuejs and also as a restful api for mobile app ... i tried to make calls using postman for login but i get nothing ?!!
@cretueusebiu advice please
@cretueusebiu how to make facebook open graph able to get our defined meta?
@luhegi this project has nothing to do with Facebook.
Is Anyone Writing a quick guide?
I didn't really understand this part.
computed: mapGetters({
user: 'auth/user'
})
This line of codes can be found in /Resources/assets/js/layouts/default.vue
Can anyone explain?
I wan't to understand it because I want to add a new computed property.
this one:
computed: {
now: function () {
return Date.now()
}
}
I tried to add a new computed property like this but an error will occur
computed: {
mapGetters({
user: 'auth/user'
}),
now: function () {
return Date.now()
}
}
@MerrySean See the vuex docs.
@cretueusebiu Hi, I was just wondering where did you get the ".role" in line 4 in this file
laravel-vue-spa/resources/assets/js/middleware/admin.js
because I was looking for it on the user's table which was stored in the database, there was no Role column, I also looked at the model of User, I only saw that you append the "photo_url" but not the Role?
so where did you get it?
@MerrySean that's not implemented, it's there just as an example.
Hello, I would like to add a new language but firstly, I don't know how you could add to the drop-down menu the two letters that refer to a certain language. I would like french or Italian as a new language. Secondly, I didn't understand why you had all the textual content in the folder "/public/js/lang-(es or en or zn)" when you can use the js like in the folder "\resources\assets\js\lang". By the way, it's a really good SPA but some comments can be useful.
i have actually added French on my end go to config and add a new language there, it will be added to the drop-down
Thanks, it's done, but I try to figure out how to bind my js file lang-fr in the public folder so it can display the spa in French. Any advice?
The translation files should be placed in resources/assets/js/lang
in order to be imported with webpack's dynamic import. Then you'll have to defined them in config/app.php
.
Well, there are some probs I had noticed : First, I add the french file that I named "lang-fr.6eef95981ab9638804ce.js" in /public/js, the translation files in resources/assets/js/lang, I defined them in config/app.php like here --> 'locales' => [ 'en' => 'EN', 'zh-CN' => '中文', 'es' => 'ES', 'fr' => 'FR' I also add that in this file : /public/js/app.js --> line 89
script.src = __webpack_require__.p + "js/" + ({"0":"lang-zh-CN","1":"lang-es","2":"lang-en","3":"lang-fr"}
In addition, I update the file /resources/assets/js/componets/Navbar.vue -> line 29
@ZHamsiou You don't create / update dist files. Those are generated by the build scripts. Just add them as I said in my previous comment.
Write a quick guide for pages, layouts, routes and middleware.