armingdev

Member Since 4 Years Ago

Experience Points
8,790
Total
Experience

1,210 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
77
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 2
8,790 XP
Jan
20
2 days ago
Activity icon

Started a new Conversation Factory Seed Multiple Relations

Hi everyone,

I need help with nested seeds for three levels and more. Il gives an example with Users, Topics, and Posts.

User

id, name

Topic

id, title, content, user_id

Post

id, content, topic_id, user_id

Relations:

  • User->has many Topics and Posts
  • Topic-> belongs to User and has many Posts
  • Post-> belongs to User and Topic

I want to create a factory seed to create 100 users and each of them to have 10 topics with 30 posts. First two levels work fine with me with code, but posts don't work:

UserSeeder

        User::factory()
            ->times(100)
            ->has(Topic::factory()->count(10))
	    ->has(Post::factory()->count(30))
            ->create();
Jan
04
2 weeks ago
Activity icon

Started a new Conversation Routes Middlware On Specific Methods

Hi everyone,

I have apiResources routes defined into routes.php file and now I have applied auth middleware to them. Thing is, I need protection only on some of the requests, for example, just on POST, DELETE and PUT. Is there a way to tell auth middleware which methods should be protected using apiResources so I don't have to define each route separetly?

Route::middleware(['auth:api'])->group(function () {
    Route::apiResources([
        'cars' => CarsController::class,
    ]);
});
Dec
09
1 month ago
Activity icon

Replied to Passport Route Redirection

Looks like its not working in redirectTo function ..

Hmm for some reason its still returning same error when I do it this way .. Im just calling simple GET request for some resource ..

Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined.
Activity icon

Replied to Passport Route Redirection

Hmm for some reason its still returning same error when I do it this way .. Im just calling simple GET request for some resource ..

Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined.
Dec
08
1 month ago
Activity icon

Started a new Conversation Passport Route Redirection

Hi everyone,

I have installed Passport following documentation on fresh Laravel installation. Thing is, Im using Laravel as REST API, so when I try to access protected routes without token, Authenticate middleware is triggered and redirectTo() function is tying to redirect to client login route .. Since Im using Laravel as API, Instead of this redirection I want to throw unauthenticated error with some code in JSON format. Just need advice if this is good solution...

I have deleted redirectTo() function in Authenticate middleware and created function in Handler.php:

    protected function unauthenticated($request, AuthenticationException $exception)
    {
        return response()->json(['error' => 'Unauthenticated.'], 401);
    }
Dec
02
1 month ago
Activity icon

Replied to Repository Pattern Create Method

I know, but its really big project and I need to separate db logic from controllers. Its not something that I can change.. That is the reason why I have never implemented it on my other projects.. On this one I cant avoid it .. Its an request.

Activity icon

Started a new Conversation Repository Pattern Create Method

Hello everyone,

I have implemented repository pattern for first time in my fresh project and looking for some answers is this a good approach.

Controller:

class CarsController extends Controller
{
	    public function store(Request $request)
    {
        return response()->json($this->repository->storeCar($request), 201);
    }
}

RepositoryInterface:

interface CarRepositoryInterface {
    public function storeCar(Request $request);
}

Repository:

class CarRepository implements CarRepositoryInterface
{
    public function storeCar(Request $request) {
        return Car::create($request);
    }
}

I'm not sure about passing this requests trough this flow. Currently this flow dosent work, controller accept request but it failing at interface part since I cant hit repository..

error:

Error: Maximum response size reached

Get request works fine.

Any1 with similar experience? Thank you

Nov
28
1 month ago
Activity icon

Replied to Homestead 11 Download

Yes, I have switch to branch 20.04 where the latest Homestead files should be, but how I can see problem is in downloading box image with Ubuntu 20.04...

I cant find Homestead 11 image anywhere on vagrant boxes list for laravel homestead. This is the reason why I cant download it... https://app.vagrantup.com/laravel/boxes/homestead

Any1 have idea how to download Homestead 11?

Activity icon

Replied to Homestead 11 Download

bump

Nov
27
1 month ago
Activity icon

Started a new Conversation Homestead 11 Download

Im trying to update my Homestead box to latest 11.4.0 with Ubuntu 20.04. I have destroyed my old virtual machine and removed old homestead box. I have checkout to branch 20.04, but now each time when I try to setup new box .. it still downloading Homestead 10 with Ubuntu 18.04. How Can i download this latest Homestead 11 image?

Nov
25
1 month ago
Activity icon

Replied to Laravel With Angular

If you are going to use Angular app I suggest you to use Laravel as API and Angular for client side. Its much easier to maintain separated repos. I have used this combination on few projects and Im really happy with it. Also, you dont need additional tutorials since you are connecting this via REST.