raviawasti

raviawasti

Member Since 6 Months Ago

Experience Points 4,210
Experience Level 1

790 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 8
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    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.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

16 Jul
1 day ago

raviawasti started a new conversation How To Use 1 ,2 3 In Slug Laravel ?

i have a post table where i am saving id, name , slug etc like this

id:1, name:How to become a Tutor?, slug : how-to-become-a-tutor

Now if i want to save another data with same name like this

id:2, name:How to become a Tutor?, slug : how-to-become-a-tutor-1(i want to add integer 1 in slug like this)

, if same question asked again i want to add how-to-become-a-tutor-2

raviawasti started a new conversation How Can I Change Class And Style On InsertImage In Summernote Editor.

I used insertImage method in summernote editor in laravel. Initially, Added style attribute as "width:600px;" on img tag. I'd like to remove this style attribute and Added some class and alt value. Is it possible?

raviawasti started a new conversation How To Avoid Image Width And Height In Summernote Editor In Laravel?

While using summernote in laravel , i was trying to save a image, it was saved perfectly but my issue is summenote automatically adds width to my image, but i want save image without width :-

but i want save image without width

, anyone help will be very helpful

15 Jul
2 days ago

raviawasti left a reply on How To Show Count Of All Subject With Slug From Post Table?

Column not found: 1054 Unknown column 'subjects.post_id' in 'where clause' (SQL: select posts., (select count() from subjects where posts.id = subjects.post_id) as subjects_count from posts) (View:

raviawasti started a new conversation How To Show Count Of All Subject With Slug From Post Table?

I have two table one posts ans subject

posts table : id, subject_id, post_name , etc subject table :id, subject_name slug etc Subject table content id :1, subject_name :Science , slug :science id :2 subject_name :Social Science ,slug:social-studies

I am saving subject id in posts table like this id -1, subject_id 2, post_name how to become a teacher. id -2, subject_id 3, post_name how to learn english.

Now my problem is i want to show count of posts for every subject like this

Science 10 posts see all Math 13 posts see all Social studies 2 posts see all

12 Jul
5 days ago

raviawasti started a new conversation Can I Define Dependency Injection In Any Class?

how to define dependency

06 Jul
1 week ago

raviawasti started a new conversation Vuejs Relationship Is Working In Blade But Not On Vuejs

normal view working

@foreach($posts as $post)

@foreach($post->comment as $comment )

{{ $comment->user->name }} i ma getting user name

@endforeach

@endforeach

vuejs component

@{{comment.user.name}} -i am not getting user name

raviawasti left a reply on How Can I Get The Slug Passed In View For Vuejs Components ?

how can i get the slug of this route

Route::get('questions/{slug}', '[email protected]');

to app.js app.js var app = new Vue({ el: '#app', data() { slug: ' ', singlePosts:[], };

so that i will pass that slug to get the details from this api route

Route::get('post/singlePage/{slug}', '[email protected]');

singlePageApi(){

axios.get(this.bUrl +'/post/singlePage/' + this.slug) .then(response=> { this.singlePosts=response.data; //we are putting datat into our data

})

},

raviawasti started a new conversation How Can I Get The Slug Passed In View For Vuejs Components ?

Route::get('questions/{slug}', '[email protected]');

//Api for single page Route::get('post/singlePage/{slug}', '[email protected]');

public function postSingle($slug){

      if(Post::where('slug',$slug)->exists()){
      $post = Post::where('slug',$slug)->first();
      }else{
        return view('404');
      }

      return view('frontend.candidates.socialmedia.Singlepost',compact('post'));
    }


       public function postSingleAPI($slug)
{

$data['posts'] = Post::where('slug',$slug)->first(); return $data;

}

app.js var app = new Vue({ el: '#app', data() { singlePosts:[],

 };

created(){ this.singlePageApi();

},

 methods:{

 singlePageApi(){

axios.get(this.bUrl +'/post/singlePage/' + this.slug) .then(response=> { this.singlePosts=response.data; //we are putting datat into our data

}) .catch(function (error) { console.log(error);//if error }); }, }

}

Singlepost.blade.php

@{{singlePosts.body}}
05 Jul
1 week ago

raviawasti left a reply on Shall I Have To Install Nodesjs In Server Or Laravel Project Folder

as i only added some features of vuejs such as add post , comment post ,like edit in my laravel project.. i had completed this modules in localhost by installing nodesjs first and then vuejs, it is workingin fine on locahost but to deploy that modules in digitalocean shall i have to install nodejs or not

raviawasti started a new conversation Shall I Have To Install Nodesjs In Server Or Laravel Project Folder

Shall i have to install nodesjs to install vuejs in server or laravel

03 Jul
2 weeks ago

raviawasti left a reply on Disable All Textarea In Loop While Commenting On A Post In Vuejs

@JOHNBRAUN - Relationship in Post.php

public function Comment() { return $this->hasMany(Comment::class, 'post_id','id')->orderBy('id','desc');

}
@{{post.content}} Comment @{{comment.content}} Comment

app.js code

var app = new Vue({ el: '#app', data() { return { title: '', content:'', posts:[], commentdata:{}, commentBoxSeen: false, }; },

});

raviawasti started a new conversation Disable All Textarea In Loop While Commenting On A Post In Vuejs

Whenever i want to comment by clicking on comment Button all the textarea of post opens at a time how to only one texarea at a time

here is view

@{{post.content}} Comment @{{comment.content}} Comment

code

var app = new Vue({ el: '#app', data() { return { title: '', content:'', posts:[], commentdata:{}, commentBoxSeen: false, }; },

});

Relationship in Post.php

public function Comment() { return $this->hasMany(Comment::class, 'post_id','id')->orderBy('id','desc');

}
01 Jul
2 weeks ago

raviawasti started a new conversation How To Use Summernote Editor In Vuejs Laravel

i want to integrate summernote in vuejs

raviawasti started a new conversation How To Show Like ,comment ,post Like Count In Vuejs Foreeach Loop Laravel

how can i show like ,comment count in vuejs foreach loop laravel

i am able to show my like count in larave blade like this

@foreach($comments->take(2) as $comment )

$commentlikeCount= App\Like::where(['comment_id'=> $comment->id])->count();

@endforeach

but no any clue in vuejs components, please help

28 Jun
2 weeks ago

raviawasti started a new conversation Whenever I Reload My View It Show Me All Raw Data In Vuejs Laravel

i am using vuejs in my view blade in app.js

whenever i try to reload the page my it show me all raw data, something like this @{{post.comment.length}} but after 2 second it will automatically loads the dynamic data, how to load all data without showing this raw data

allpost(){

axios.get('http://localhost' +'/posts') .then(response=> {

this.posts=response.data; 

}) .catch(function (error) { console.log(error);//if error }); },

raviawasti left a reply on Laravel + VueJs : When Should I Use A Blade Or VueJs

@EDWINGURE - Vue js: did you noticed that when page loading, first it shows raw vue syntax (e.g. {{ name }}) and after half of second it changes to variable value? I Use Homestead and virtualbox (i7 8gb)

i am also getting the same issue...whiel using vuejs in blade , how did you resolved that issue.. will be glad if you assist me...

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@EDOC - why there is token issue while running npm run watch

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@EDOC - i am logged in sir although i am getting this error

raviawasti left a reply on Laravel + VueJs : When Should I Use A Blade Or VueJs

@CHRISTOPHER - can i use vuejs for one or two page for post comment and like edit etc..

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@EDOC - thank you i tried your way but why i am getting token errors

Errors compiling template:

invalid expression: Unexpected token { in

{{ auth()->id() }}

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@SERGIU17 - i have done accoding to you but its says api token something like this:-

Errors compiling template:

invalid expression: Unexpected token { in

{{ auth()->id }}

Raw expression: :user-id="{{ auth()->id }}"

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

no its is in post.vue

export default {

data() { return { posts:[],

};

},

i am getting all i need by the above code and its big so i didnot send you all code

my problem is i am not able to get user id to pass in it

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@EDOC - how can i pass user in it , please help here is my code:-

                 <div v-for="post ,key in posts" >

{{post.updated_at }}

       <div class="dropdown">
                                <a data-toggle="dropdown" class="dropdown-toggle"><i class="fa fa-ellipsis-h"></i></a> 
                                <ul class="dropdown-menu">
                                   <li><a title="Edit Post" class="pencil-edit">Edit Post</a></li>
                                   <li><a  @click="deletePost(post,key)" >Delete</a></li>
                                </ul>
                             </div>

here is component code:-

allpost(){

axios.get(this.bUrl +'/posts') .then(response=> {

this.posts=response.data; //we are putting datat into our data

}) .catch(function (error) { console.log(error);//if error }); },

i am getting all the data which i want to show but i want to show delete button and edit to only it user not everyone

raviawasti started a new conversation How To Show Like ,comment ,post Like Count In Vuejs Foreeach Loop Laravel

how can i show like ,comment count in vuejs foreach loop laravel

i am able to show my like count in larave blade like this

@foreach($comments->take(2) as $comment )

$commentlikeCount= App\Like::where(['comment_id'=> $comment->id])->count();

@endforeach

but no any clue in vuejs components, please help

raviawasti left a reply on I Want To Show Delete Button Only To Its Post Owner In Vuejs

@SERGIU17 - Thank you i had applied according to you but,

Property or method "user" is not defined on the instance but referenced during render.

raviawasti left a reply on Get Authenticated User Data In Vuejs

@RIKUDOSAMA - how did you find the user id in vuejs component ,can you help please

raviawasti started a new conversation I Want To Show Delete Button Only To Its Post Owner In Vuejs

  • @click="deletePost(post,key)">Delete
  • how can i do that

    raviawasti left a reply on How To Show List Of City In Select Form From Api Larvel Vuejs?

    @BURLRESEARCH - i am getting error on this line

      _this.subjects = _.map(response.data, function (subject) {
    
    27 Jun
    2 weeks ago

    raviawasti left a reply on How To Show List Of City In Select Form From Api Larvel Vuejs?

    @BURLRESEARCH - should i have to install vue-select or its default vuejs

    raviawasti started a new conversation How To Show List Of City In Select Form From Api Larvel Vuejs?

    i want to get the dropdown of city form api where i want to select city and its value will be id

    raviawasti started a new conversation How Can I Show Edit And Delete To The Post Owner In Vuejs Comeponent Larave?

    @if(Auth::check())

                                 <div class="dropdown">
                                    <a data-toggle="dropdown" class="dropdown-toggle"><i class="fa fa-ellipsis-h"></i></a> 
                                    <ul class="dropdown-menu">
    
    
                                       <li><a @click="deletePost(post,key)" title="Edit Post" class="pencil-edit">Edit Post</a></li>
                                       <li><a href="http://localhost/schooldukan/post/delete/7">Delete</a></li>
                                    </ul>
                                 </div>
                                 @endif
    

    26 Jun
    3 weeks ago

    raviawasti started a new conversation How To Type In Specific Textarea In Vuejs Loop?

    Comment
                                   </div>
    

    when i type in textarea all textarea automatically filled , how to avoid this in loop

    export default { data() { return { commentdata:'', }; },

    25 Jun
    3 weeks ago

    raviawasti left a reply on Vuejs With Laravel Is Not Working On Android/iphone

    @MARCORIESER - here is my webpack.mix.js

    let mix = require('laravel-mix');

    /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */

    mix.js('resources/assets/js/app.js', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css');

    raviawasti left a reply on Vuejs With Laravel Is Not Working On Android/iphone

    @BOBBYBOUWMANN - no it is not working on android chrome and iphone chrome/safari , what to do now

    raviawasti started a new conversation Vuejs With Laravel Is Working

    i had installed vuejs with npm in localhost , on laptop browser working fine but when i view same page on my android/iphone , vuejs component doesn't loads on it,somebody help

    21 Jun
    3 weeks ago

    raviawasti left a reply on Uncaught ReferenceError: Require Is Not Defined In Vuejs Laravel

    @SERGIU17 - in this path resources/assets/js/app.js

    raviawasti started a new conversation Vue Is Not Defined

    i am using laravel 5.6 , i had installed nodejs, npm and vuejs while using this on app.js

    window.Vue = require('vue');

    i got this error in web console

    Uncaught ReferenceError: require is not defined

    help me to resolve,

    raviawasti left a reply on How To Get Data From Database?

    You can get it from its model

    19 Jun
    4 weeks ago

    raviawasti left a reply on Which Platform Should We Use To Add Live Comment, Chat And Like Module Inl Laravel

    @PEACENGARA - i mean to say when i comment on any post it will show instantly without page refresh,, to do that what should i use

    raviawasti left a reply on Which Platform Should We Use To Add Live Comment, Chat And Like Module Inl Laravel

    @AURAWINDSURFING - i mean to say when i comment ,like, edit, on any post it will show instantly without page refresh,, to do that what should i use

    raviawasti started a new conversation Which Platform Should We Use To Add Live Comment, Chat And Like Module Inl Laravel

    Which platform should we use to add live comment, chat and like module inl laravel

    raviawasti started a new conversation How Do I Install Vuejs In Laravel 5.2

    how do i install vuejs in laravel 5.2 in linux localhost

    17 Jun
    1 month ago