Return to homepage

Comments

Martin

Hello guys, do you know how to delete an empty arrays from the resource? I always get back an empty arr when I use whenLoaded('') or with(['']) and even both combined.... please let me know

  • 1
Jeffrey

Thank you for the great course! It’s so useful.

The only thing is that Lesson 8 seemed incomplete, could you fix it and upload the full version?

https://codecourse.com/watch/laravel-api-resources?part=conditionals

  • 1
Andres

Not sure if this was a post publishing issue but at date (July-20-2019) Lesson 8. Conditionals is incomplete. It cuts off at 20 seconds.

  • 7
Feras

At date (October-24-2019)

MR. Alex lesson 8 is incomplete

  • 0
Danyel

Hey Alex thanks for the great course, but I believe that video number 8 is incomplete, can you please upload the full video ?

  • 2
Shavonn

Thanks, Alex! Totally saved me with the issue I was having today!

  • 1
Ozan

Would you suggest using this rather than using fractal?

  • 0
Andres

Great content Alex! Thanks once again! would it be possible at some point in time to showcase what are the limitations of using Resources vs Fractal? Been using it for a while now (fractal) I don't see any reason why Resources will not suffice, but you probably have a better understanding about this? Thanks!

  • 0
Antonio

Alex, I am building a totally different project but I am using your concept. When I include the relationship I am getting an empty array. Do you have any ideas why this could be happening?

  • 1
Peter

Alex, what about adding another pagination into the relationship which is a collection, how possible is that. for instance....

Topic(paginated)->relatationship(posts)-paginated

  • 0
Alex

I wouldn't advise doing this. It would be better to load in the paginated topics, then when a topic is requested, load the paginated posts in. Try not to include too much data in one endpoint.

  • 0
Vuong

Great work, Alex! I love the new layout <3

I'm working on Nuxt & Laravel API, could you tell me how to protect Laravel API? I want to give the access only for nuxt site.

  • 0
Shane

I think it is already protected due to CORS and CSRF tokens?

  • 0
Rico

Brilliant as always but the downloads don't seem to be working?

  • 0
Alex

Sorry Rico, this should be resolved now. Any issues let me know.

  • 0
Sergio

Alex, just brilliant your work, awersome

  • 0
Ruvaifa

Alex! I love the new layout of codecourse. I think you should make some videos on Material Design and also on Roles and Permissions (Spatie). I love your videos and it helps me a lot. Thanks.

  • 0
jonathon

Alex! I love the new layout. In my website I use Laravel and Vue.js so should I be setting up my API routes with API Resources? API Resources are new to me but look like this way would make more sense.

  • 0
Alex

That depends on how you're doing it right now.

If you're just doing:

1return response()->json([
2 //
3]);

then it's certainly worth making the switch. It'll save you a lot of time and repeated code!

  • 0
Corey

Love the new site Alex!!! Toggling through the videos is very smooth! Also, love that there is now a comments section that is associated with each series!!!

  • 0
Shahmir

Whats the shortcut key in atom editor to pull namespace ?

  • 0
Alex

I don't use Atom, but in Sublime you can grab this package:

https://github.com/erichard/SublimePHPCompanion

  • 0
Sue

Happy two see you change the website. I' am iOS developer before. With your help, I can write my own full project by one guy. I expect more Laravel API things coming out.

  • 0
Alex

Thanks for the suggestion Sue, I'll certainly be covering more API development soon.

  • 0
Iberno

#Great Not only the lesson, but this great content. This Explain your hard work on the last 4 or 5 weeks. Man... this new design was AWESOME. Using Vuejs, Nuxt and? Maybe a new content showing your design a new saga from Codecourse. Love it. Congratulations Alex, you are The Rock of Code!

  • 0
Alex

Thanks! The stack is Laravel for the API and as you said, Nuxt.js.

  • 0
Thomas

Great lesson! I'm also loving the new site design!

  • 1
Alex

Cheers Thomas!

  • 0