Member Since 1 Year Ago
3,490 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Started a new Conversation Laravel Give Server 500 Error On Server
When checked logs error the error here $request = Illuminate\Http\Request::capture() in index.php
Replied to This Code Give "Server Error" What Is The Problem ?
{message: "Server Error"} message: "Server Error"
Started a new Conversation This Code Give "Server Error" What Is The Problem ?
$company_id = company_id();
$user_type = Auth::user()->user_type;
$projects = Project::select('projects.*')
->with('members')
->where('company_id',$company_id)
->when($user_type, function ($query, $user_type) {
if($user_type == 'staff'){
return $query->join('project_members','projects.id','project_members.project_id')
->where('project_members.user_id',Auth::id());
}
})
->orderBy("projects.id","desc");
return Datatables::eloquent($projects)->filter(function ($query) use ($request) {
if ($request->has('status')) {
$query->whereIn('status', json_decode($request->post('status')));
}
})->addColumn('action', function ($project) {
return '<form action="'.action('[email protected]', $project['id']).'" class="text-center" method="post">'
.'<a href="'.action('[email protected]', $project['id']).'" data-title="'. _lang('Edit Project Details') .'" class="btn btn-primary btn-xs ajax-modal"><i class="ti-notepad"></i></a> '
.'<a href="'.action('[email protected]', $project['id']).'" data-title="'. _lang('Update Project') .'" class="btn btn-warning btn-xs"><i class="ti-pencil"></i></a> '
.csrf_field()
.'<input name="_method" type="hidden" value="DELETE">'
.'<button class="btn btn-danger btn-xs btn-remove" type="submit"><i class="ti-eraser"></i></button>'
.'</form>';
})->setRowId(function ($project) {
return "row_".$project->id;
})->rawColumns(['action','members.name','status','name'])->make(true);
Started a new Conversation This Code Give Me Error Array To String Converging $recordArray[$lang->name]
$recordArray = array(); foreach($languages as $lang){ if(isset($record->message_data[$lang->code])){ $recordArray[$lang->name] = ''.$record->message_data[$lang->code].''; }elseif($lang->code == 'en'){ dd($lang->name); $recordArray[$lang->name] = ''.$record->message_data['x'].''; }else{ $recordArray[$lang->name] = ''; } } array_push($recordsArray,$recordArray);
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 ..
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" ]
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.
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 !?
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.
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();
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();
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
Replied to How Can I Access The Name ?
php it is a value from remoteConfig (Firestore) object of objects
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"}} }
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
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.
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.
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 ?
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 ?
Started a new Conversation I Want To Add Algolia <ais-search-box> Outside (hits)
I want to add algolia outside (hits)
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) !?
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
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>
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 ?
Started a new Conversation How Can I Return Search Results From Algolia With Laravel
How can I return search results from algolia with laravel
Started a new Conversation How Can I Catch Reference Name (firebase + Laravel) ?
How can i catch reference name (firebase + laravel) ?
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 [▶]
Started a new Conversation How Can I Remove Metronic Theme Datatable Pagination Kt_datatable ?
How can I remove metronic theme datatable pagination kt_datatable ?
Started a new Conversation I Want To Use Algolia Search With Laravel And Firestore .. Any Help ?
did any one dot it before ?
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);
Started a new Conversation How Can I Filter Firebase Data With Laravel By " Name " ?
How can I filter firebase data with laravel by " name " ?
Replied to This Code Give Me A Close Parenthesis In The Blade
tnx so much, I found parenthesis inside of subheader file.
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 ?
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;
}
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 ?