Member Since 1 Year Ago
3,890 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Replied to Can't Get Vuetify 2 To Work With Laravel
I have tried changing APP_ENV to "production" and have changed webpack.mix.js as follows with no luck:
const mix = require('laravel-mix');
//MYCODE
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
//MYCODE
.webpackConfig(webpack => {
return {
plugins: [
new VuetifyLoaderPlugin()
]
};
});
I just get the following error:
/vuetifyapp/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
Error: Cannot find module 'vuetify-loader/lib/plugin'
Started a new Conversation Can't Get Vuetify 2 To Work With Laravel
Hi,
I haven't been able to get the new version of Vuetify (which has components à-la-carte) to work with Laravel.
The problem is related to not using Vue CLI 3. From the Vuetify documentation:
"If there is a reason you are unable to utilize the Vue CLI 3 package, you can manually install the vuetify-loader through your vue.config.js or webpack config."
"Vuetify loader - Keeping track of all the components you're using can be a real chore. The vuetify-loader alleviates this pain by automatically importing all the Vuetify components you use, where you use them. This will also make code-splitting more effective, as webpack will only load the components required for that chunk to be displayed."
"Webpack installation - You can also explicitly install the loader for webpack based projects. Similar to the vue.config.js setup, you simply add the loader to your project's webpack plugins."
// webpack.config.js
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
module.exports = {
plugins: [
new VuetifyLoaderPlugin()
],
}
How do I use this code in webpack.mix.js?
Replied to Passing A Laravel Object Conditionally To A Vue Component.
@johnbraun Thanks a lot for your solution. I'll give it a try!
Started a new Conversation Passing A Laravel Object Conditionally To A Vue Component.
Hi,
I have a form in a vue component for entering a user's profile information. When the user has already created a profile, the form is populated with the data from an object $profile that is passed from the controller to the blade view and then passed to the vue component as the prop "profile".
When the user has no profile currently ($profile is null), I would like the form fields to be blank.
I'm not sure how to treat the prop "profile" in the component when the object does not exist.
The script of my vue component is as follows:
export default {
mixins: [formSubmit],
props: [
"profile",
],
data() {
return {
fields: {
about: this.profile.about,
website: this.profile.website,
instagram: this.profile.instagram,
facebook: this.profile.facebook,
},
snackbarString: "Saved"
};
},
};
</script>
When $profile is passed from the controller, it works fine but when the object does not exist yet, I get an undefined error in vue :
TypeError: Cannot read property 'about' of undefined
How should I deal with the object conditionally in the vue component?
Sorry if it's obvious...