md_imran

Software Engineer at MRZ International

Member Since 1 Year Ago

Dhaka

Experience Points
910
Total
Experience

4,090 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
5
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

  • Community Pillar

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

Level 1
910 XP
Apr
19
3 weeks ago
Activity icon

Replied to How To Get Relation's Parent Data Only When Child Data Is Empty?

I want to get, those users whom did not upload documents, so with relations, I want to get those users list.

Activity icon

Started a new Conversation How To Get Relation's Parent Data Only When Child Data Is Empty?

Dear,

I have collections like

[0] => Array
        (
            [id] => 2
            [user_id] => 8
            [referred_by] => 
          	........
            [profile_description] => 
            [spoken_language] => 
            [activated_at] => 
            [wali_email] => 
            [last_login] => 2020-05-04 12:48:11
            [created_at] => 2020-04-01 15:23:26
            [updated_at] => 2020-05-04 18:48:11
            [deleted_at] => 
            [deleted_by] => 
            [countries] => Array
                (
                    [id] => 18
                    [sortname] => BD
                    [currency] => BDT
                    [name] => Bangladesh
                    [phonecode] => 880
                )

            [user] => Array
                (
                    [id] => 8
                    [role_id] => 2
                    [username] => 
                    [email] => [email protected]
                    [first_name] => Ripa
                    [last_name] => Akter
                    [profile_pic] => 
                    [mobile_number] => 1914845704
                    [country_code] => 880
                    [timezone] => Asia/Riyadh
                    [status] => active
                    [created_at] => 2020-04-01 15:23:26
                    [updated_at] => 2020-11-21 06:10:00
                    [deleted_at] => 
                )

            [cities] => Array
                (
                    [id] => 7291
                    [name] => Dhaka
                    [state_id] => 348
                )

            [profile_images] => Array
                (
                )

            [user_documents] => 
        )

    [1] => Array
        (
            [id] => 3
            [user_id] => 9
            [referred_by] => 
            [reference_id] => NM1100008
            .......
            [last_login] => 2020-07-13 04:54:31
            [created_at] => 2020-04-04 12:03:37
            [updated_at] => 2020-07-13 10:54:31
            [deleted_at] => 
            [deleted_by] => 
            [countries] => Array
                (
                    [id] => 231
                    [sortname] => US
                    [currency] => USD
                    [name] => United States
                    [phonecode] => 1
                )

            [user] => Array
                (
                    [id] => 9
                    [role_id] => 2
                    [username] => 
                    [email] => [email protected]
                    [first_name] => AHMED
                    [last_name] => ABBAS
                    [profile_pic] => 7jl9Naqimbf2YGAanVS0krOcvJx9JHnYpB8VuEhN.jpeg
                    [mobile_number] => 6153920033
                    [country_code] => 1
                    [timezone] => Asia/Dhaka
                    [status] => active
                    [created_at] => 2020-04-04 12:03:37
                    [updated_at] => 2020-11-21 06:10:00
                    [deleted_at] => 
                )

            [cities] => Array
                (
                    [id] => 42803
                    [name] => Alamo
                    [state_id] => 3924
                )

            [profile_images] => Array
                (
                    [0] => Array
                        (
                            [id] => 4
                            [customer_id] => 3
                            [image] => egw543l4y5cc20P6aQImex9mTZg0caJ2oAfWTUIW.jpeg
                            [make_profile_pic] => no
                            [sequence_no] => 1
                            [status] => rejected
                            [comment] => 
                            [created_at] => 2020-04-04 12:10:29
                            [updated_at] => 2020-04-06 13:57:01
                            [deleted_at] => 
                        )

                    [1] => Array
                        (
                            [id] => 9
                            [customer_id] => 3
                            [image] => 7jl9Naqimbf2YGAanVS0krOcvJx9JHnYpB8VuEhN.jpeg
                            [make_profile_pic] => no
                            [sequence_no] => 2
                            [status] => rejected
                            [comment] => 
                            [created_at] => 2020-04-06 13:15:10
                            [updated_at] => 2020-04-06 13:57:01
                            [deleted_at] => 
                        )

                )

            [user_documents] => Array
                (
                    [id] => 1
                    [customer_id] => 3
                    [doc_type] => 1
                    [document] => N8xFORsPpkTayTQ9Ihyz0ly7QM62TJHxvHhSFQSN.png
                    [admin_comment] => 
                    [approve_status] => approve
                    [other_gov_id] => 
                    [doc_no] => 1
                    [created_at] => 2020-04-04 12:39:12
                    [updated_at] => 2020-04-06 13:57:01
                    [deleted_at] => 
                )

        )

I want to get rows only when user_documents is empty.

[user_documents] => 

Help pls. Thanks in Advance.

Apr
17
3 weeks ago
Activity icon

Replied to How To Merge 2 Eloquent Queries?

user

id | .... | profile_pic

1|.........| asdfasdf.jpg

2|.........| null 3|.........|asdfas.jpg

profile_images

id| name | status 1|asdfasf | pending 2| asdfasf| rejected

first I want to check if user has no profile picture , second also want to check there is no pending picture too.

Activity icon

Started a new Conversation How To Merge 2 Eloquent Queries?

Hello Artisans,

I have a filter queries Customers, where I have relation with 2 other tables (user, profileImages)

First query

$query->whereHas('user', function ($q) {
                    $q->where('profile_pic', null);
                })

Second Query

$query->whereHas('profileImages', function ($q) use ($pictureUploadStatus) {
                    $q->orWhereNotIn('status', [RequestType::PENDING, RequestType::APPROVED]);
                });

Individual its okey. but I need to merge them 2 into 1. So that , both queries run at same time.

Help please. Thanks in Advance.

Mar
31
1 month ago
Activity icon

Started a new Conversation Order By Status (pending, Approved, Rejected)

Hello Genius,

I can get the list with order by date or anything with asc or desc. But I need to fetch the data which 'status' = 'pending' first then others status.

How can I do that?

TIA

Mar
11
1 month ago
Activity icon

Replied to Stay On Same Page While Reload The Page

yes load more is ajax button.

Mar
10
2 months ago
Activity icon

Started a new Conversation Stay On Same Page While Reload The Page

Hello Ariisan, I have a long list of users viewing UI. I have use eloquent pagination for viewing each block 8 users. Problem is that, while I click on 'load more' it fetch 4 records then If i visit any users and return BACK by browser PREVIOUS BUTTOn , it does not stay on same position. It return to first page withou loading previous data.

Can you suggest me any solutions?

Mar
08
2 months ago
Activity icon

Replied to Sound Effect For Chat

function playNotificationSound(audioFile) {
    if (audioFile != null) {
        const audio = new Audio(audioFile);
        audio.play();
    }
}

here is the section, I needed to call if there is 1 new message

 $.each(nodes, function (key, val) {
            firebase.database().ref('recent/' + val).on('value', response => {
                if (response.exists()) {
                    chat_msg_object = response.val();
                    if (chat_msg_object.receiver_id == userId && chat_msg_object.isRead == '0') {
                        i += parseInt(chat_msg_object.count);
                    }
                    if (i > 0) {
                        @php Session::put('newMessageNotification', 'play'); @endphp

                         var playNotification = "{{ $notificationStatus }}";
                         console.log(playNotification);

                         if (playNotification == 'play') {
                             playNotificationSound('{{ mix('sounds/new-message-notification.mp3') }}');
                             @php Session::forget('newMessageNotification'); @endphp
                         }

                        $('.messageSpan').text(i);
                        $(".messageSpan").addClass("bez");
                    }
                }
            });
        });

Activity icon

Replied to Sound Effect For Chat

Will it play repeatedly? Like I need if user A send message to user B. Once it will play sound, not always even reload the page.

Activity icon

Started a new Conversation Sound Effect For Chat

Dear Artisan,

The chat was implemented by firebase. I needed sound effect while user send message bro others.

Audio is playing fine but I have to make sure that audio will play once.

Is there any concept you can share?

Mar
05
2 months ago
Activity icon

Started a new Conversation Get Value OrderBy Relation Field In Eloquent

Hello Artisans,

I have a query where I am fetching users chat-history, but I need last login come by descending first. How can I do this?

ChatUsers::with(['sender','sender.user', 'receiver','receiver.user'])->orderBy(
            "created_at",
            'DESC'
        )->paginate(config('constants.AdminPageLimit'), ['*'], 'page', $page)

Result:

[0] => Array
                (
                    [id] => 77
                    [sender_id] => 630
                    [receiver_id] => 657
                    [node] => 630_657
                    [created_at] => 2021-03-04 04:58:38
                    [updated_at] => 2021-03-04 04:58:38
                    [deleted_at] => 
                    [sender] => Array
                        (
                            [id] => 630
                            [user_id] => 690
                            .............................
                            [last_login] => 2021-03-05 06:26:34
                            [created_at] => 2020-06-16 10:41:17
                            [updated_at] => 2021-03-05 06:26:34
                            [deleted_at] => 
                            [user] => Array
                                (
                                    [id] => 690
                                    [role_id] => 2
                                    ..................
                                    [created_at] => 2020-06-16 10:41:17
                                    [updated_at] => 2021-03-04 04:58:18
                                    [deleted_at] => 
                                )

                        )

                    [receiver] => Array
                        (
                            [id] => 657
                            [user_id] => 739
                         .........................
                            [last_login] => 2021-03-06 03:07:23
                            [created_at] => 2020-07-05 16:12:13
                            [updated_at] => 2021-03-06 03:07:23
                            [deleted_at] => 
                            [user] => Array
                                (
                                    [id] => 739
                              ..................
                                    [updated_at] => 2021-03-02 10:11:44
                                    [deleted_at] => 
                                )

                        )

                )

            [1] => Array
                (
                    [id] => 76
                    [sender_id] => 657
                    [receiver_id] => 692
                    [node] => 692_657
                    [created_at] => 2021-02-13 16:48:01
                    [updated_at] => 2021-02-13 16:48:01
                    [deleted_at] => 
                    [sender] => Array
                        (
                            [id] => 657
                           .......................... 
                            [last_login] => 2021-03-06 03:07:23
                            [created_at] => 2020-07-05 16:12:13
                            [updated_at] => 2021-03-06 03:07:23
                            [deleted_at] => 
                            [user] => Array
                                (
                                    [id] => 739
									..................
                                    [created_at] => 2020-07-05 16:12:13
                                    [updated_at] => 2021-03-02 10:11:44
                                    [deleted_at] => 
                                )

                        )

                    [receiver] => Array
                        (
                            [id] => 692
                           ............
                            [last_login] => 2021-03-06 03:08:20
                            [created_at] => 2020-11-17 09:47:06
                            [updated_at] => 2021-03-06 03:08:20
                            [deleted_at] => 
                            [user] => Array
                                (
                                    [id] => 780
                                    [role_id] => 2
                                   ...........
                                    [created_at] => 2020-11-17 09:47:06
                                    [updated_at] => 2021-02-20 08:21:46
                                    [deleted_at] => 
                                )

                        )

                )
Dec
14
4 months ago
Activity icon

Started a new Conversation How To Get Property At Getting Object 'with'

I have an object as this-

[ { id: 20, user_id: 26, created_at: "2020-12-01 00:16:47", updated_at: "2020-12-01 14:10:43", deleted_at: null, user: { id: 26, role_id: 2, ................... created_at: "2020-04-07 00:16:47", updated_at: "2020-11-21 06:10:00", deleted_at: null }, customer_logins: { id: 20, customer_id: 20, ....... created_at: null, updated_at: null, deleted_at: null }, *

how can i get 'customer_logins' value from this object? TIA