PATH:
home
/
rwabteecom
/
project_11
/
resources
/
views
/
dashboard
/
pages
/
Editing: community.blade.php
@extends('dashboard.layouts.app') @section('css') @endsection @section('body') <div class="div-community"> </div> @endsection @section('js') <script> function index(){ $.ajax({ url: '{{ route('dashboard.community.indexRender') }}', method: "GET", processData: false, contentType: false, success: function(response) { $('.div-community').html(response) }, error: function(response) { console.log(response) } }); } index() </script> <script src="{{ asset('dashboard/js/community.js') }}"></script> <script> $(document).ready(function() { $('body').on('click', '.followBtnStore', function() { var formData = new FormData(); var user_id=$(this).data('id'); var user_name=$(this).data('name'); formData.append('_token', "{{ csrf_token() }}"); formData.append('user_id', user_id); $.ajax({ url: '{{ route('dashboard.follow.follow') }}', method: "POST", processData: false, contentType: false, data: formData, success: function(response) { // $("#userprofileImage").attr('src', response.data.profileImage); Toastify({ text: "{{ __('updated successfuly') }}", duration: 3000, close: true, className: "add-success", style: { background: "#28a745", } }).showToast(); index() }, error: function(response) { console.log(response) } }); }); }) </script> <script> $(document).ready(function() { $('body').on('click', '.unfollowBtnStore', function() { var formData = new FormData(); var user_id_unfollow=$('#user_id_unfollow').val(); formData.append('_token', "{{ csrf_token() }}"); formData.append('user_id', user_id_unfollow); $.ajax({ url: '{{ route('dashboard.follow.unfollow') }}', method: "POST", processData: false, contentType: false, data: formData, success: function(response) { // $("#userprofileImage").attr('src', response.data.profileImage); $('#unfollowModal').modal('hide'); Toastify({ text: "{{ __('updated successfuly') }}", duration: 3000, close: true, className: "add-success", style: { background: "#28a745", } }).showToast(); index() }, error: function(response) { console.log(response) } }); }); }) $("body").on('click', '.followers_following_header .nav-item .nav-link', function () { $('.followers_following_header .nav-link').removeClass('active'); $('.allFollowers-con .tab-pane').removeClass('active show'); // Add active class to the specified tab button and its corresponding tab pane $(this).addClass('active'); $($(this).attr('href')).addClass('active show'); }) $("body").on('click', '.unfollowBtn', function () { new mdb.Modal($("#unfollowModal")).show(); let name=$(this).data('name'); let id=$(this).data('id'); $('.unfollow-name').html(`{{__('Unfollow')}} ${name} !`) $('#user_id_unfollow').val(id) }) </script> @endsection
SAVE
CANCEL