saqueib

saqueib

Senior Web Developer at New Delhi

Member Since 4 Years Ago

New Delhi

Experience Points
8,260
Total
Experience

1,740 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
39
Lessons
Completed
Best Reply Awards
3
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 2
8,260 XP
Sep
18
1 month ago
Activity icon

Replied to Add Axios Interceptor On Nova Requests

Here is how I manage to do it to focus on the input on error.

Nova.request().interceptors.response.use(function (response) {
        return response;
    }, function (error) {
        // Focus first input field with error
        let firstError = Object.keys(error.response.data.errors)[0];
        let input = document.getElementById(firstError);

        if(input) input.focus()
        
        
        return Promise.reject(error);
    });

But I think its good idea to just add it in nova itself.

I still can't handle the exception from app/Exceptions/Handler.php can someone help

Sep
11
2 months ago
Activity icon

Started a new Conversation Add Axios Interceptor On Nova Requests

I there any way I can add interceptor for axios used in laravel nova. I have long-form I need to focus on the first error field if there is some validation error.

I already have some route beforeach hook running fine


// this is working fine
Nova.booting((Vue, router, store) => {
router.beforeEach((to, from, next) => {
    ...
    next()
})

// Add a response interceptor
axios.interceptors.response.use(function (response) {
    return response;
}, function (error) {
    // Do something with response error
    // NOT LOGING ANYTHING IN CONSOLE
    console.log(error.response)
    return Promise.reject(error);
});

I also can't handle the exception from app/Exceptions/Handler.php

public function render($request, Exception $exception)
{
    // nothing is dumped on validation error
    dd($exception);

    return parent::render($request, $exception);
}

I am using Laravel 5.8 and Nova v2.3.0, please help guys

Aug
16
2 months ago
Activity icon

Replied to How Edit A Reply Fills Markdown In Laracasts Forum Model

@bobbybouwmann Great! do you know which library @JeffreyWay is using to do the conversion?

Aug
15
2 months ago
Activity icon

Replied to When A Route URL Is Same As The Package Name, That URL Does Not Work

If you have a lot of routes defined then you should try re-ordering them to see if it works, most of the time's route definition get overwritten by other lines.

If you can share your route file then it will be easy to help

Activity icon

Replied to Remove Code On Click On A Button.

Since you are appending some HTML on a click. Events are not bound to the button you just added.

You need to change your click handler to use on or live (prior to 1.7 jquery)

$('.comments-section') .on("click", ".questions-section__button-cancel", function () { });

    var questionSectionCommentReply = $('.questions-section__comment-reply');

    $('.questions-section__comment-reply > .questions-section__body').remove();
  })

check more here https://stackoverflow.com/questions/4944293/jquery-liveclick-vs-click

Activity icon

Replied to SQLite Driver Installed But Not Seen!

It looks like SQLite driver is not installed. You can test it by putting the following code at the top in public/index.php


$dir = 'sqlite:/database/database.sqlite';
$dbh  = new PDO($dir) or die("cannot open the database");
dd($dbh);

It should not give you cannot open the database

Activity icon

Replied to Slug Validation

Your implementation looks good. I would suggest if you have an input for a slug from the user then you should prefer the client-side value for the slug, but if it is only going to be generated based on the title without any option to change it from client-side then you don't need anything else.

As saying goes, "Never trust user" so it's good you have a fallback setup.

Activity icon

Started a new Conversation How Edit A Reply Fills Markdown In Laracasts Forum Model

I wanted to know how the edited reply is implemented. What I think it stores body in markdown and it's converted to HTML when requested by view.

But when you click on edit reply it doesn't make any ajax request to get the reply markdown to prefill the textarea.

Does anyone know how it's done? Is @JeffreyWay using some frontend HTML to markdown converter?

Activity icon

Replied to Cannot Access Attributes Of A Model In View.

It looks like you dont have relation setup in you post model, add the relation and it should work


class Post extends Model {
     //...
     
     public function author() {
          return $this->belongsTo(User::class, 'author_id');
     }
}

Share your model and posts table info if you need more help