davy_yg
4 months ago
497
2
Vue

Creating blog component

Posted 4 months ago by davy_yg

Hello, please cek this blog component:

blog.blade.php

@include('template/header')

<div class="container">
<h1><b>BLOG</b></h1><br><br>


@foreach($list as $blog)

<blog
    :props_blog_title = '$blog->title'
    :props_blog_image = '$blog->image'
        :props_blog_content = '$blog->content'
    >
	</blog>

@endforeach

Blog.vue

<template>
	<b><h3>{{ this.props_blog_title }}</h3></b><br>
	<br>

	<img class="img-responsive" src="{{ url(Storage::url(this.props_blog_image)) }}" width="400px"><br><br>

	{!! Str::limit(this.props_blog_content, 500, '...') !!}


	<br><br>
	<a href="{{ url('/f_blog_detail/'.$blog->id) }}">Read More ..</a><br><br>
</template>

<script>
	import axios from 'axios'

	export default {
    name: 'WishlistButton',
    props: {
        props_blog_title: null,
        props_blog_image: null,
        props_blog_content: null
    },
    data () {
        return {
            
        }
    },
    mounted() {
        
    },
    methods : {
        
    }
	}
</script>

app.js

import Vue from 'vue'
import SuiVue from 'semantic-ui-vue'
import axios from 'axios'
import numeral from 'numeral-es6'
import Autocomplete from 'vuejs-auto-complete'
import VueContentPlaceholders from 'vue-content-placeholders'

Vue.use(SuiVue)
Vue.use(VueContentPlaceholders)

Vue.component('axios', axios);
Vue.component('slides', require('./components/Slides.vue').default);
Vue.component('blog', require('./components/Blog.vue').default);

I tested the program and the component does not appears. I wonder why?

Please sign in or create an account to participate in this conversation.