pickab00

pickab00

Member Since 2 Years Ago

Experience Points
11,170
Total
Experience

3,830 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
2
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 3
11,170 XP
Apr
13
1 month ago
Activity icon

Replied to Laravel Passport Token Encryption

So just use https and a certificate will encrypt the header token?

Apr
12
1 month ago
Activity icon

Started a new Conversation Laravel Passport Token Encryption

How can I hide the Laravel Passport Barer Token when sending it over axios?

I am currently using axios on react native and sending the token over header as a Barer Token to make api requests with laravel passport. But by using wireshark, I can see the token. Is there a way to encrypt the key? And for laravel to decrypt or something? Or any other method than encryption

Apr
11
1 month ago
Activity icon

Replied to Ranking System

Hi. Thanks for this. But the whole point is to not manually define the if else or switcgh. But rather be able get it from table, and check if the users ranking is above or below a specific ranking. And depending on that, give diamond or gold etc. this way, I can add more types of ranking to the table in the future

Apr
09
1 month ago
Activity icon

Started a new Conversation Ranking System

Need some help with a ranking system.

Basically, currently I have a ranking column in my Users table. And what I wanted to do was to have another table which had the definitions of the rankings. This Rankings table will hold the type of ranking and the amount of points needed to earn to reach that level. What I mean is 1000 ranking points and the user will become a platinum user. How would I go about doing this? I am not sure how I could define whether between a specific amount, the user should earn a ranking.

Ranking table:

id from to ranking_award

So if suppose that is my table, and if I had a ranking from 100 - 200 ranking award is gold member, how can I tell that the current authenticated user is at this ranking by checking from ranking table?

Mar
01
2 months ago
Activity icon

Replied to Show Function Show Blank File Instead Of Data

Shoot. You beat me to it. I posted the same solution as show method expects a parameter of $id. Pass that in, find or fail and then return

Activity icon

Replied to Show Function Show Blank File Instead Of Data

Ok final test. Do this. Here is the full show method.

public function show($id)
    {
    //dont forget to import. then again, you must have already done that.
        $category = CMSCategory::findOrFail($id);
    
    return $category->name;
    //now if you visit the link, http://localhost/supportcrm/public/cms/category/2, you must see a result
    }

Activity icon

Replied to CSS Styles Not Applied

I don't think this is blade related. Because if you can see the files linked in source, then the blade syntax is fine.

Check if there is any errors fetching the file. Or if the styles are being applied to anything by inspecting a specific element. By doing that, you will see if the style sheet is linked or not.

Activity icon

Replied to Show Function Show Blank File Instead Of Data

Snap. Forgot to mention. Check if your category 2 exists

Activity icon

Replied to How To Get The Relationship From A Pivot Table

$room = Room::with(['mainmenus', 'mainmenulanguages'])->where('room_number', 404)->firstOrFail(); didn't quiet work so I did this instead:

$room = Room::with(['mainmenus.mainmenulanguages' => function($q){
            $q->where('lang_id', 3)->get();
}])->where('room_number', 404)->firstOrFail();

So I am just accessing the main menus mainmenulanguages relationship and outputting that.

And this $room->mainmenulanguages; returns nothing for some reason.

And I wanted to run another query inside of the mainmenulanguages as well. Thank you!

Activity icon

Replied to Cannot Upgrade To Laravel 7

Wait there is a laravel 7 now?

Activity icon

Replied to Show Function Show Blank File Instead Of Data

Check directly in your show method by returning return $cMSCategory->name. Maybe the name field is blank or something. Are you trying to show one specific record or a collection of records? If it is a collection, use for loop in blade. Or my guess is that the name is blank in your db. Try something else. Like $cMSCategory->created_at or $cMSCategory->id

Activity icon

Replied to CSS Styles Not Applied

Ok so I can see you have extended the layout "frontend.layout.general". Is the css file inside the "general" blade file? And are you yielding style from that file?

Also, one of your @section is not closed. The title section is not closed. Close it with either @endsection or @stop

Activity icon

Replied to Show Function Show Blank File Instead Of Data

Have you tried my suggestion 1 and 2?

Activity icon

Replied to Show Function Show Blank File Instead Of Data

  1. Check if you are reaching the blade file. Just write something random on the blade file and retry.

  2. Check if you can return anything on the show method. So instead of returning a view, do return 'test';. If that works, then do return $cMSCategory and see if you are getting any json response.

  3. One possibilities maybe that your show method is actually being called to the wrong method. Show the route file and try the above first.

Activity icon

Replied to CSS Styles Not Applied

Can you post an example of your first page and other pages?

If I am getting this correct, your first page is the page on your question correct? And on other pages you are doing section('style') @endsection?

Did you extend your layout?

Activity icon

Started a new Conversation How To Get The Relationship From A Pivot Table

Currently I have a pivot table from main_menus table and rooms table. The pivot table is main_menu_room. My issue is that I have another table named main_menu_languages which stores the languages of main menu table. In my pivot calls, I am currently doing this:

//as an example
$room = Room::where('room_number', 404)->firstOrFail();

return $room->mainmenus;

My relationships are as follows:

//main menu
public function mainmenulanguages(){
        return $this->hasMany(MainMenuLanguage::class, 'main_menu_id', 'id');
    }

    public function rooms(){
        return $this->belongsToMany(Room::class);
    }


//room
public function mainmenus(){
        return $this->belongsToMany(MainMenu::class);
    }

So how can I take the relationship mainmenulanguages?