Abdullah_Iftikhar

Abdullah_Iftikhar

Full-Stack Developer at Full-Stack Developer

Member Since 8 Months Ago

Lahore

Experience Points
3,210
Total
Experience

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
0
Lessons
Completed
Best Reply Awards
1
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
3,210 XP
Jun
16
3 weeks ago
Activity icon

Started a new Conversation 419 Error On Every Post Route In Laravel

I am working on laravel project I have to face a 419 error on every post route. I have checked the CSRF token I have attached with every form. anyone can help me why this occurs.

Laravel version 7.0 PHP version 7.2 PHP version 7.3 on server

Jun
02
1 month ago
Activity icon

Awarded Best Reply on Show The Time Using Js Function From Created_at

@surajjd I have done it

for (data in result) { var date= new Date(result[data].created_at+"+0000");

                    // console.log(date.getTimezoneOffset());
                    var name_string = result[data].user_name;
                    var res = name_string.split(" ");
                    if (res[1]) {
                        if (res[0].charAt(0) === 'A' || res[0].charAt(0) === 'a' || res[0].charAt(0) === 'E' || res[0].charAt(0) === 'e' || res[0].charAt(0) === 'F' || res[0].charAt(0) === 'f' || res[0].charAt(0) === 'G' || res[0].charAt(0) === 'g' || res[0].charAt(0) === 'H' || res[0].charAt(0) === 'h' || res[0].charAt(0) === 'I' || res[0].charAt(0) === 'i' || res[0].charAt(0) === 'J' || res[0].charAt(0) === 'j') {
                            $('#conversation').append(
                                '<li class="left clearfix">' +
                                '<span class="chat-img pull-left">' +
                                '<p class="img-circle" style="background-color: #b8e986">' + res[0].charAt(0) + res[1].charAt(0) + '</p>' +
                                '</span>' +
                                '<div class="chat-body clearfix">' +
                                '<div class="header">' +
                                '<strong class="primary-font chat-user-name-style" >' + result[data].user_name + '</strong>' + ' <small class="pull-right text-muted">' +
                                /*'<span class="glyphicon glyphicon-time"></span>'*/ +date.getMonth() +'-'+ date.getDate() +'-'+ date.getFullYear()+' '+detectAmPm(date.getHours())["hours"]+':'+date.getMinutes()+':'+date.getSeconds()+' '+detectAmPm(date.getHours())["time"]+'</small>' +
                                '</div>' +
                                '<p class="chat-user-messages-style">' + result[data].message + '</p>' +
                                '</div>' +
                                '</li>'
                            );
                        }

}

Activity icon

Replied to Show The Time Using Js Function From Created_at

@surajjd I have done it

for (data in result) { var date= new Date(result[data].created_at+"+0000");

                    // console.log(date.getTimezoneOffset());
                    var name_string = result[data].user_name;
                    var res = name_string.split(" ");
                    if (res[1]) {
                        if (res[0].charAt(0) === 'A' || res[0].charAt(0) === 'a' || res[0].charAt(0) === 'E' || res[0].charAt(0) === 'e' || res[0].charAt(0) === 'F' || res[0].charAt(0) === 'f' || res[0].charAt(0) === 'G' || res[0].charAt(0) === 'g' || res[0].charAt(0) === 'H' || res[0].charAt(0) === 'h' || res[0].charAt(0) === 'I' || res[0].charAt(0) === 'i' || res[0].charAt(0) === 'J' || res[0].charAt(0) === 'j') {
                            $('#conversation').append(
                                '<li class="left clearfix">' +
                                '<span class="chat-img pull-left">' +
                                '<p class="img-circle" style="background-color: #b8e986">' + res[0].charAt(0) + res[1].charAt(0) + '</p>' +
                                '</span>' +
                                '<div class="chat-body clearfix">' +
                                '<div class="header">' +
                                '<strong class="primary-font chat-user-name-style" >' + result[data].user_name + '</strong>' + ' <small class="pull-right text-muted">' +
                                /*'<span class="glyphicon glyphicon-time"></span>'*/ +date.getMonth() +'-'+ date.getDate() +'-'+ date.getFullYear()+' '+detectAmPm(date.getHours())["hours"]+':'+date.getMinutes()+':'+date.getSeconds()+' '+detectAmPm(date.getHours())["time"]+'</small>' +
                                '</div>' +
                                '<p class="chat-user-messages-style">' + result[data].message + '</p>' +
                                '</div>' +
                                '</li>'
                            );
                        }

}

Activity icon

Replied to Show The Time Using Js Function From Created_at

@surajjd I think we will not write the javascript in php I have tried but nothing get any response

Activity icon

Started a new Conversation Show The Time Using Js Function From Created_at

Created_at getting from database using ajax so I want to display this created at in AM or PM anyone can help to sort out it?

like 11:00 AM

May
31
1 month ago
Activity icon

Started a new Conversation SplFileInfo::getSize(): Stat Failed For C:\xampp\tmp\phpB29E.tmp

facing the error when moving the $name to DB after uploading the pdf I am using laravel 6.0.4

$pdf = $request->file('project_document'); $name= time() . '-' .$pdf->getClientOriginalName(); $pdf->move(public_path().'/projectsPDF', $name);

May
13
1 month ago
Activity icon

Replied to 2020-05-12T19:40:45Z Need To Convert It In Day Month Date Year

@michaloravec

DateTime @1589504400 {#385 ▼ date: 2020-05-15 01:00:00.0 +00:00 } get time? I want to get the time in AM or PM from Carbon::parse() result?

Activity icon

Started a new Conversation DateTime @1589504400 {#385 ▼ Date: 2020-05-15 01:00:00.0 +00:00 } Get Time?

I want to get the time in AM or PM from Carbon::parse() result?

Activity icon

Started a new Conversation 2020-05-12T19:40:45Z Need To Convert It In Day Month Date Year

I have this formate " 2020-05-12T19:40:45Z " I want to convert it in date day month year using Carbon or core PHP any function.

Activity icon

Replied to Working With Large Databse

@bashy Index applies on searching not getting the data from DB.

May
09
2 months ago
Activity icon

Started a new Conversation How To Make Live Search In Laravel?

For example, I have 28k zip data in my DB and each zip has 5 digit range. So if I write first the digit then ajax request gets the data from the database related to this search.

like I write 459 and ajax request get the data 45934,45932,45926,45945,45978,4593479,4593480 etc.

So now I want to handle it in the controller and send the data to ajax response for view please share any best way or best query for implementation?

Activity icon

Replied to Display Bulk Data Using Ajax From DB In Laravel

@gzai can you share any reference link?

Activity icon

Started a new Conversation Display Bulk Data Using Ajax From DB In Laravel

Explanation: I have US states and each state have a number of thousand zips code so now at this time I want to select the state the make ajax call to get the zips of this state and it takes time to loading on view how I can make it efficient?

I want to decrease the loading time.

May
07
2 months ago
Activity icon

Replied to Working With Large Databse

@bashy please can you explain your query on how to get large data from DB.

Apr
29
2 months ago
Activity icon

Replied to Get The Day Name From The Date In Laravel?

@michaloravec

Carbon::tomorrow()->format('l Y m d')

Thanks it's done.

Activity icon

Replied to Get The Day Name From The Date In Laravel?

"l 04-30-2020" this output is not my expected output @michaloravec

Activity icon

Replied to Get The Day Name From The Date In Laravel?

@michaloravec sorry it's not working according to my expectations.

Activity icon

Started a new Conversation Get The Day Name From The Date In Laravel?

I want to get the name of the day from the given date.

any builtin function in PHP or laravel "Carbon"

explanation: like Carbon::tomorrow()->format('m-d-Y') this I want to know the day name like monday,tuesday etc

Mar
03
4 months ago
Activity icon

Started a new Conversation I Want Set Current Time Zone Using Carbon:now() ?

Hi Mates. I want to set the current time zone using Carbon:: now() in Laravel >= 5.8 Please explain with step by step how's it is possible in the controller. Thanks. Regards: Abdullah Iftikhar

Feb
27
4 months ago
Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

@sti3bas i replace this code but this code hides the map.

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

@sti3bas I have google map and number of players with diff long lat. basically i want to show the marker for every user on map on lat long basis.

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

@sti3bas its for 0 index but I have many numbers of long lat I want to change it. but how ?

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

@sti3bas GMaps({ el: '#mymap', lat: 31.5204, lng: 74.3587, zoom:6 });

how i pass lat long in it dynamic.

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

@sti3bas how I will pass multiple long lat in single map function ?

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

its create map on every iteration just i want to change long and lat

Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

please write the code for the response.

Activity icon

Started a new Conversation I Want Display Dynamic Marker On Google Map Using JS.

var locations = ''; console.log(locations); var mymap = new GMaps({ el: '#mymap', lat: 31.5204, lng: 74.3587, zoom:6 }); mymap.addMarker({ lat: 31.5204, lng: 74.3587, click: function(e) { alert('This Is Lahore, Pakistan.'); } });

this is response

[{"id":1,"user_id":2,"latitude":"37.33068424","longitude":"37.33063124","attacked_by":"1","created_at":"2020-02-09 00:00:00","updated_at":"2020-02-16 00:00:00"}]

how can i add multiple pointers using this response lang lat?

Activity icon

Awarded Best Reply on Why I Am Getting Error While I Have Change Model Name And Db Table Name

protected $table = ['game_ones']; protected $guarded=['id'];

try it.

Activity icon

Replied to Why I Am Getting Error While I Have Change Model Name And Db Table Name

protected $table = ['game_ones']; protected $guarded=['id'];

try it.

Feb
12
4 months ago
Activity icon

Started a new Conversation How Can I Search Data From Database With Eloquent In Laravel ?

I have multiple options like search on the basis of unique id gender etc so how can I perform this function with one query?

basically its searching functionality from the database.

Activity icon

Replied to How To Get Data With Sorting From Controller ?

@sinnbeck I have relation city with stat.

How can again I need cities in alphabetically sort form.

public function searchCityForState(Request $request) { $state = State::find($request->id); $cities = $state->searchCities; return $cities; }

Activity icon

Replied to How To Get Data With Sorting From Controller ?

@sinnbeck I have tried but not get the expected answer.

Activity icon

Started a new Conversation How To Get Data With Sorting From Controller ?

I have this query I want to get data from the database with alphabetically sorting. and also get the city with the same sorting with relation.

        $states = State::where('status', 1)->sortBy('name')->get();
Feb
08
5 months ago
Activity icon

Replied to How To Store This Jason Response Data In Variable ?

@sti3bas Do I need a region in 1 array please provide the helping code for it.

Feb
07
5 months ago
Activity icon

Started a new Conversation How To Store This Jason Response Data In Variable ?

[ { "region": "Alabama", "country": "us" }, { "region": "Alaska", "country": "us" }, ]

Feb
04
5 months ago
Activity icon

Started a new Conversation Webrtc Works On Intranet But Not On Internet

I am working on a video call app using webrtc. My issue is that when I am connected on the same network, then the video call work fine but on a different network webrtc, there is no response. Please give me some solution. Here is the IceServer code snippet:

var iceServers = [{ 'urls': [ 'stun:webrtcweb.com:7788', // coTURN 'stun:webrtcweb.com:7788?transport=udp', // coTURN ], 'username': 'muazkh', 'credential': 'muazkh' }, { 'urls': [ 'turn:webrtcweb.com:7788', // coTURN 7788+8877 'turn:webrtcweb.com:4455?transport=udp', // restund udp

                'turn:webrtcweb.com:8877?transport=udp', // coTURN udp
                'turn:webrtcweb.com:8877?transport=tcp', // coTURN tcp
            ],
            'username': 'muazkh',
            'credential': 'muazkh'
        },
        {
            'urls': [
                'stun:stun.l.google.com:19302',
                'stun:stun1.l.google.com:19302',
                'stun:stun2.l.google.com:19302',
                'stun:stun3.l.google.com:19302',
                'stun:stun4.l.google.com:19302',
                'stun:stun.l.google.com:19302?transport=udp',
            ]
        }
    ];
Jan
30
5 months ago
Activity icon

Started a new Conversation Lang Localize

How i can display current language in ul li ?

Jan
21
5 months ago
Activity icon

Replied to How To Check The Auth In Controller Constructor In Laravel 5.8 Or Above

when the controller calls it skip the middleware so i want to resolve it.

if Auth::user()->role == 'user' { Admin secret key }

else { user secret key

}

Activity icon

Replied to How To Check The Auth In Controller Constructor In Laravel 5.8 Or Above

public function __construct() { // parent::__construct(); /** setup PayPal api context **/

  $this->middleware(function ($request, $next) {
    $this->user = Auth::user();
    dd('s');
    return $next($request);
  });
    dd('Out of middlewear');

    $paypal_conf = \Config::get('paypal');
    $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));
    $this->_api_context->setConfig($paypal_conf['settings']);
}
Activity icon

Replied to How To Check The Auth In Controller Constructor In Laravel 5.8 Or Above

because i want to pass dynamic client and secret key for paypal.

if Auth::user()->role == 'user' { Admin secret key }

else { user secret key

}

Activity icon

Replied to How To Check The Auth In Controller Constructor In Laravel 5.8 Or Above

@snapey I have used already but the constractor skips this middleware.

$this->middleware(function ($request, $next) { $this->projects = Auth::user()->projects;

        return $next($request);
    });
Activity icon

Started a new Conversation How To Check The Auth In Controller Constructor In Laravel 5.8 Or Above

I have facing Auth::user()->role is null in the constructor.

I have used it but its not working

$this->middleware(function ($request, $next) { $this->user = auth()->user();

return $next($request);

});

I need help to sort out it how I can get it.

Activity icon

Replied to How To Get Users From Table Expect 2 Specific User

you can get your user email and user whereNotIn.

Jan
20
5 months ago
Activity icon

Started a new Conversation How To Pass The Value From Controller To Config Folder File Like Paypal.php.

I need help to pass the value from controller to selected file in config folder like paypal.php ?