mahmoudtrageh

mahmoudtrageh

Member Since 1 Year Ago

Experience Points
1,350
Total
Experience

3,650 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
0
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.

Level 1
1,350 XP
Sep
24
3 days ago
Activity icon

Started a new Conversation How To Hide All Results Of Algolia InstantVue Js Search If Query Empty ?

How to hide all results of algolia instantVue js search if query empty when page start loading ..

Sep
22
5 days ago
Activity icon

Started a new Conversation I Want To Search In Array By Array Of Ids From Checkbox ?

I have this array

array:3 [ "id" => "1" "icon" => "zadcall-expHealth" "name" => array:2 [ "ar" => "الصحة" "en" => "Health" ] ]

I want to search in it by value of this array of ids and get all probertites

array:2 [ 0 => "1" 1 => "3" ]

Activity icon

Replied to How Can I Match These Two Arrays And Get Users ?

no problem, sorry I can't find firebase tag so I make it laravel.

Activity icon

Replied to How Can I Match These Two Arrays And Get Users ?

but i am using firestore cloud .. I think this is not going to work !?

Activity icon

Replied to How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

please could you tell me why ? and if you have time can you give another best solution.

Activity icon

Started a new Conversation How Can I Match These Two Arrays And Get Users ?

I have this array resulted from checkboxes in blade

$array:2 [ 0 => "Health" 1 => "Legal" ]

$interest = $array:2 [ 0 => "Health" 1 => "Legal" ]

I want to match it with that field in firebase

"interests" => array:1 [ "Health" => true, "Legal" => true, ]

to get users have one of these interests

I try this but not working

$users = $db->collection('users')->where('interests', 'array-contains-any', $interest)->documents();

Sep
21
6 days ago
Activity icon

Replied to How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

ok this is my controller function

public function send_all_notifications(Request $request) {

  $firestore                = app('firebase.firestore');
  $db                       = $firestore->database();
  $gender = (int) $request->gender;
  $gender_noti_title = $request->gender_noti_title;
  $gender_noti_message = $request->gender_noti_message;

  $messaging = app('firebase.messaging');

  $users = $db->collection('users')->where('gender', '=', $gender)->documents();

  $tok['token'] = '';

  foreach($users as $user) {

    foreach($db->collection('users')->document($user['id'])->collection('tokens')->documents() as $tok) {
      
    $tok['token'];
      
    $deviceTokens = $tok['token'];

    $notification = Notification::create($gender_noti_title, $gender_noti_message);

    $message = CloudMessage::new();

    $message = $message->withNotification($notification);

    $messaging->sendMulticast($message, $deviceTokens);

    }
  }

return response()->json(["status" => "ok"]);

}

ok so I need to loop over this and get 50 records every (10 seconds) to continue and send notification until end.

$users = $db->collection('users')->where('gender', '=', $gender)->documents();

Activity icon

Replied to How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

do you have a link to a documentation or example to understand better. thank you

Activity icon

Replied to How Can I Access The Name ?

thank you so much

Activity icon

Replied to How Can I Access The Name ?

thank you so much.

Activity icon

Replied to How Can I Access The Name ?

php it is a value from remoteConfig (Firestore) object of objects

Activity icon

Started a new Conversation How Can I Access The Name ?

How can I access the name property ?

{ "1":{"id":"1","icon":"zadcall-expHealth","name":{"ar":"الصحة","en":"Health"}}, "3":{"id":"3","icon":"zadcall-expLegal","name":{"ar":"القانون","en":"Legal"}}, "4":{"id":"4","icon":"zadcall-expFitness","name":{"ar":"اللياقة والتغذية","en":"Fitness and nutrition"}}, "5":{"id":"5","icon":"zadcall-expDesign","name":{"ar":"التصميم","en":"Design"}} }

Activity icon

Replied to How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

can you please provide me with an example of @snapey answer I tried a lot but I can't reach anything ! thank you

Activity icon

Replied to How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

thank you all.

if I have 500 users in users table

I want to get 50 and loop of them and execute a function

and then return back and get another 50 records and so on.

Sep
20
1 week ago
Activity icon

Started a new Conversation How Can I Do A Cronjob To Send Notification Every 5 Seconds ?

I have 500 records of users in database and I create a function to send notifications to them how can I use chronjob to send notifications to them (only 50 users every 5 seconds) instead of using loop.

Sep
14
1 week ago
Activity icon

Replied to I Want To Use OrderBy Throw This Array ?

tnx so much.. but it will sort only 10 results (the limit value) .. can you help me to make it sort all results ?

Activity icon

Started a new Conversation I Want To Use OrderBy Throw This Array ?

this code responsible for retrieving data and make a pagination from firestore

$limit = 10;

$url = 'm-url'&pageSize='.$limit.'&pageToken='.$nextPageToken;

$json = json_decode(file_get_contents($url), true);

$users = $json['documents'];

I want to use orderBy and get the data on basis of created_at field ?

Sep
13
2 weeks ago
Activity icon

Started a new Conversation I Want To Add Algolia <ais-search-box> Outside (hits)

I want to add algolia outside (hits)

Sep
10
2 weeks ago
Activity icon

Replied to How Can I Send Code To A Url As An Email With Laravel ?

no I have a flutter code and i want to send this code to a user email (using email url) !?

Activity icon

Started a new Conversation How Can I Send Code To A Url As An Email With Laravel ?

How can i send code to a url as an email with laravel

Activity icon

Started a new Conversation How Can I Use If Condition In This Code (algolia Search In Laravel)

instantsearch.widgets.hits({ container: '#hits', templates: { item(hit) {

    return `
    <!--begin::Card-->
    	<div class="card card-custom gutter-b">
        		<div class="card-body">
      			<!--begin::Top-->
            		<div class="d-flex">
               			 <!--begin::Pic-->
               			 <div class="flex-shrink-0 mr-7">
                    			<div class="symbol symbol-50 symbol-lg-120">
                            			<img alt="Pic" src="`+ hit.image_url +`" />
                   				 </div>
                			</div>
Sep
08
2 weeks ago
Activity icon

Started a new Conversation How Can I Delete User From Voximplant Using Laravel Or Php ?

How can i delete user from Voximplant using laravel or php ?

Sep
07
2 weeks ago
Activity icon

Started a new Conversation How Can I Return Search Results From Algolia With Laravel

How can I return search results from algolia with laravel

Sep
02
3 weeks ago
Activity icon

Started a new Conversation How Can I Catch Reference Name (firebase + Laravel) ?

How can i catch reference name (firebase + laravel) ?

Sep
01
3 weeks ago
Activity icon

Started a new Conversation How Can I Get Count Of Document In Firebase Laravel

-query: Google\Cloud\Firestore\Query {#818 ▶}

this rows -> how can if get its count ?

-rows: array:30 [▶]

Activity icon

Started a new Conversation How Can I Remove Metronic Theme Datatable Pagination Kt_datatable ?

How can I remove metronic theme datatable pagination kt_datatable ?

Aug
31
3 weeks ago
Activity icon

Started a new Conversation I Want To Use Algolia Search With Laravel And Firestore .. Any Help ?

did any one dot it before ?

Aug
30
4 weeks ago
Activity icon

Started a new Conversation I Want To Pick Up User Data From This Firestore Filter Output

query: array:3 [ "from" => array:1 [ 0 => array:1 [ "collectionId" => "users" ] ] "where" => array:1 [ "compositeFilter" => array:2 [ "op" => 1 "filters" => array:1 [ 0 => array:1 [ "fieldFilter" => array:3 [ "field" => array:1 [ "fieldPath" => "Ahmed Mahdy" ] "op" => 7 "value" => array:1 [ "mapValue" => array:1 [ "fields" => array:4 [ "name" => array:1 [ ] "fields" => array:1 [ "mapValue" => array:1 [ "fields" => array:28 [ "credit" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "email" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "" ] ] ] ] "stripe_id" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "cus_HubVy660SwvG22" ] ] ] ] "image_url" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ ] ] ] ] "gender" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "1" ] ] ] ] "name" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "Ahmed ‎Mahdy" ] ] ] ] "contacts_count" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "3" ] ] ] ] "online" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => true ] ] ] ] "received_gift" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "data" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ ] ] ] ] "pro_flag" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "call_request_price" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "phone" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "+966541562354" ] ] ] ] "profile_progress_percentage" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "doubleValue" => array:1 [ "doubleValue" => 71.428571428571 ] ] ] ] "last_login" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "timestampValue" => array:1 [ "stringValue" => "2020-08-27T14:41:40.508Z" ] ] ] ] "call_price" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "hot_number" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "351895" ] ] ] ] "id" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0PiDsmZhrohDLEb5LK3VRSOLv1L2" ] ] ] ] "free_request" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "earnings" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "created_at" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "timestampValue" => array:1 [ "stringValue" => "2020-08-27T14:41:40.508Z" ] ] ] ]

this is my controller code

$citiesRef = $db->collection('users'); $containsQuery = $citiesRef->where($query, 'array-contains', $user);

Activity icon

Started a new Conversation How Can I Filter Firebase Data With Laravel By " Name " ?

How can I filter firebase data with laravel by " name " ?

Activity icon

Replied to This Code Give Me A Close Parenthesis In The Blade

tnx so much, I found parenthesis inside of subheader file.

Activity icon

Started a new Conversation This Code Give Me A Close Parenthesis In The Blade

@if(config('layout.subheader.display')) @if(array_key_exists(config('layout.subheader.layout'), config('layout.subheader.layouts'))) @include('layout.partials.subheader.'.config('layout.subheader.layout')) @else @include('layout.partials.subheader.'.array_key_first(config('layout.subheader.layouts'))) @endif @endif

this code give me a close parenthesis in the blade .. why ?

Aug
26
1 month ago
Activity icon

Started a new Conversation Firestore Pagination With Laravel

I want to understand this code ?!

how can I change this link (url) to fit pagination of any page ?

$limit    = 10;

    $url  = 'https://firestore.googleapis.com/v1beta1/projects/zadcall/databases/(default)/documents/users?	key=AIzaSyD8LI57uBNjHG_r8QWpSvt8DXsdd5S5eKw&pageSize='.$limit.'&pageToken='.$nextPageToken;

    $json                     = json_decode(file_get_contents($url), true);

    $calls                    = $json['documents'];

    if(isset($json['nextPageToken'])){

      $nextPageToken            = $json['nextPageToken'];

    }else{

      $nextPageToken            = null;

    }
Aug
25
1 month ago
Activity icon

Started a new Conversation Upload Image With Google Storage And Laravel ?

I want to upload image to google storage cloud by using kreait package .... any help ?