fcode

Software Engineer at Lagos, Nigeria

Member Since 1 Year Ago

Lagos, Nigeria

Experience Points
12,590
Total
Experience

2,410 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
120
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 3
12,590 XP
Apr
26
2 weeks ago
Activity icon

Replied to Heroku - Uploaded Images Dissapear.

@nickywan123 You can use Cloudinary. It's basically free. That is what I use all the time.

Apr
24
2 weeks ago
Activity icon

Replied to Laravel: Order Query Using Relationship

Thanks, @michaloravec for the article. I wonder why Google did not find the article during my googling

Activity icon

Started a new Conversation Laravel: Order Query Using Relationship

Hello guys. Please, I need help with the following issue. I have two tables, user and contents. users has many contents and content belongs to user.

I want to query:

  1. All users with their contents ordered by the users with the most recent content
  2. users with their contents that were uploaded within the last 24hrs

Any suggestion with working code samples will be appreciated.

Mar
13
1 month ago
Activity icon

Replied to Sanctum Throws "Session Store Not Set On Request"

Okay, guys. I finally figured the problem. While the above video did not add a Referer in the header for the login route, adding it solved the issue with Postman. Thanks, @axtg for mentioning it in your latest reply.

Activity icon

Replied to Sanctum Throws "Session Store Not Set On Request"

I am currently having the same issue. I am using Laravel Homestead for my development environment. I tried following this video Laravel Sanctum (Airlock) with Postman but it did not work for me.

My setting

API_URL=http://api.myapi.test
SESSION_DRIVER=cookie
SESSION_DOMAIN=.myapi.test
SANCTUM_STATEFUL_DOMAINS=myapi.test

I tested with a nuxt frontend app and it worked, however, doing the same in Postman throws a Session store not set on request error.

Anyone with ideas on how to deal with this. Almost all the examples I have seen uses localhost. Any way to achieve this using a real URL with Postman?

Jan
18
3 months ago
Activity icon

Replied to Request Time And Memory Usage

I am building a RESTful API. Can I use debugbar for that?

Activity icon

Started a new Conversation Request Time And Memory Usage

Hello guys.

I am building an API with Laravel and I am required to return in my response header for every request how long the request took and how much memory is consumed.

This question from StackOverflow log actions in Laravel and execution time seems to address the part for the time it took the request to execute (is this the correct way?). However, I am not able to find how to get the memory consumed by each request.

Please, I need ideas.

Dec
27
4 months ago
Activity icon

Replied to Unique Validation On Related Model

Sorry, I haven't been able to try it. I've been busy. I will do so when I did try it.

Dec
25
4 months ago
Activity icon

Replied to Unique Validation On Related Model

Thanks for the tip. Is it possible to provide a sample code of how you might implement the second option? The options have to be sent together with the question in one request.

I'm still new to Laravel and PHP. I have read the documentation for custom rules but I still can't wrap my head around it fully.

Activity icon

Replied to Unique Validation On Related Model

The options is an array of objects and are sent with the question in one request payload. At this point, the question has not been created so there is no way to have access to the question_id. This is a sample of the request payload:

{
    "number": "1",
    "type": "multiple choice",
    "year": 2018,
    "content": "<div>This is the question of all questions</div>",
    "options": [
        {
            "label": "b",
            "content": "option content",
            "is_correct": true
        },
        {
            "label": "b",
            "content": "option content",
            "is_correct": false
        }
    ]
}

It will be easier to use the above suggestion when updating or if the options are sent separately after creating the question so that by then we can have the question_id available.

Activity icon

Replied to Unique Validation On Related Model

So that means that the constraint will only apply to the labels for a particular question_id correct? Can you provide some explanation as to how it works? And how do I account for this in the FormRequest validation rules?

Activity icon

Started a new Conversation Unique Validation On Related Model

Hello guys. I need some help with validation.

This is my situation. I have a questions table and an options table. A question can have many options for up to five which means that options have a column for question_id. In the options table is a label field that is used to indicate the option as a, b, c, d, or e. I want to make the labels of the options for a particular question to be unique when creating a new question with options. This means that there cannot be two options with the same label belonging to the same question_id. The options are sent together with the question in the same request as an array of objects.

I don't want to add a unique constraint to the option label on the database level because that will affect the entire table. But the uniqueness is only on the options belonging to the same question.

How do I achieve this using Laravel validation FormRequest? Or any other way to achieve this?

Your suggestions will be highly appreciated.