Ara

Ara

Member Since 5 Years Ago

Experience Points
7,010
Total
Experience

2,990 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
53
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 2
7,010 XP
Sep
19
1 month ago
Activity icon

Started a new Conversation Overriding Default Panels

Is it possible to override the panels/cards component to change the style?

Sep
18
1 month ago
Activity icon

Started a new Conversation Nested Relationship Searchable

Hey guys, I have a quick question. I have 4 models: Member, Player/Coach and TeamRoster. So TeamRoster has a morph relationship with Player and Coach. Player and Coach have a 1 to 1 with Member. From the page to add a new TeamRoster resource, I added a MorphTo with searchable. But I can only search using the id, is it possible to search by the member.full_name?

May
10
5 months ago
Activity icon

Replied to Extra Slash In The Route

@denniseilander Oh, I didn't know that. Thanks a lot!

Activity icon

Started a new Conversation Extra Slash In The Route

Hey guys,

Quick question. I want to recreate this URL: domain.com//file.txt. I tried this route:

Route::get('riot.txt', function () {
    return Storage::disk('local')->get('riot.txt');
});

And even escaped the slash:

Route::get('\/riot.txt', function () {
    return Storage::disk('local')->get('riot.txt');
});

But I get an 404 anyways.... Any idea why?

May
01
5 months ago
Activity icon

Replied to Faking API Calls From An Package

Hi, so it is a facade:

<?php

namespace App\Facades;

use Illuminate\Support\Facades\Facade;

class RiotApi extends Facade
{
    protected static function getFacadeAccessor () {
        return 'riot-api';
    }
}

And I bind it using a service provider:

<?php

namespace App\Providers;

use App\RiotInfos;
use Illuminate\Support\ServiceProvider;
use RiotAPI\LeagueAPI\Definitions\Region;
use RiotAPI\LeagueAPI\LeagueAPI;

class RiotApiServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->bind('riot-api', function ($app) {
            return new LeagueAPI([
                LeagueAPI::SET_KEY             => RiotInfos::first()->api_key,
                LeagueAPI::SET_REGION          => Region::NORTH_AMERICA,
                LeagueAPI::SET_DATADRAGON_INIT => true,
                LeagueAPI::SET_CACHE_RATELIMIT => true,
                LeagueAPI::SET_INTERIM         => true,
            ]);
        });
    }
}
Activity icon

Started a new Conversation Faking API Calls From An Package

Hi,

I am using an external package that is not built for Laravel and uses guzzle HTTP. I am trying to mock a call in my tests and return a fake response. But it's actually hitting the endpoint instead of returning the fake response. Here is my test:

Http::fake([
            'https://americas.api.riotgames.com/lol/match/v4/matches/*' =>
                Http::response($this->fakeMatchResponse(), 200),
        ]);

        Event::fake();

        factory(RiotInfos::class)->create();

        $match = factory(Match::class)->create([
            'riot_id' => 3400521116,
            'winner_id' => null,
        ]);

        factory(SeasonInformation::class)->create([
            'season_id' => $match->season_id,
            'division_id' => $match->division_id,
            'tournament_code' => 123
        ]);

        $job = new FetchMatchStatsJob($match);
        $job->handle();

        $match->refresh();

        // 1. Fetch Match stats
        Http::assertSent(function ($request) {
            return $request->url() == 'https://americas.api.riotgames.com/lol/match/v4/matches/*';
        });

And here is my job:


// 1. Fetch Match stats
        $tournament_code = SeasonInformation::bySeasonDivision($this->match->season_id, $this->match->division_id)->first()->tournament_code;
        $matchStats = RiotApi::getMatchByTournamentCode($this->match->riot_id, $tournament_code);

But it actually tried to hit the endpoint because I got a 403 error message from that endpoint when I run my tests.