SkyCoder

SkyCoder

Member Since 2 Years Ago

Experience Points
17,900
Total
Experience

2,100 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
73
Lessons
Completed
Best Reply Awards
2
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 4
17,900 XP
Jul
14
1 day ago
Activity icon

Started a new Conversation Better Mail Service For Laravel App

I am deciding which service to use between these two but if you have any other please add.

https://www.sendinblue.com/

https://www.mailgun.com/

I would like to use it for the newsletter.

Jul
02
1 week ago
Activity icon

Started a new Conversation How To Handle Failed Login In Laravel

From laravel out of the box auth login, how can I flash session on any type of fails?

Like in Requests I have this:

protected function failedValidation(Validator $validator)
    {
        request()->session()->flash('modal', 'join-us');
        throw (new ValidationException($validator))
                    ->errorBag($this->errorBag)
                    ->redirectTo($this->getRedirectUrl());
    }

I would like to flash session for modal that is used, so I can show it opened after redirect.

Jun
20
3 weeks ago
Activity icon

Replied to Get Users That Has One Post With Only One Post

Its similar to your solution so Ill accept yours

Activity icon

Replied to Get Users That Has One Post With Only One Post

This solution works: In user model:

public function post () {
	return $this->hasOne(Post::class)->first() // latest()
}

And then $users = App\Models\User::has('post')->with('post')->get();

Activity icon

Replied to Get Users That Has One Post With Only One Post

Thats not the problem, i typed it wrong here....

Activity icon

Replied to Get Users That Has One Post With Only One Post

In user model:

public function posts () {
	return $this->hasMany(Post::class);
}

In post model:

public function user () {
	return $this->belongsTo(User::class);
}
Activity icon

Started a new Conversation Get Users That Has One Post With Only One Post

How can I change this to get only one post per user:

User::has('posts')->with('posts')->get()

$users = User::has('posts')->with(['posts', function ($query) {
	$query->first();
}])->get()
  • This one throws an error: "Illuminate/Database/Eloquent/RelationNotFoundException with message 'Call to undefined relationship [] on model [App/Models/User].";

User hasMany Posts is used.

Jun
19
3 weeks ago
Activity icon

Started a new Conversation Laravel Cacher Remember Foreevr Returns Nothing

cache()->rememberForever('books', function () {
  return Book::all();
})

vs

return Book::all();

First doesn't return anything, second does

Jun
13
1 month ago
Activity icon

Replied to How To Put Laravel Components Within Separate Folders

Confirmed! I am blind, didn't see the dot, thought it was -.

Activity icon

Started a new Conversation How To Put Laravel Components Within Separate Folders

When I make new component I would like to have base component like Modal within root directory as it is made:

app/View/Components/Modal.php

And then I would like to have something like

app/View/Components/Modals/Login.php
app/View/Components/Modals/Register.php
app/View/Components/Modals/ResetPassword.php

How could I use/call these components like ones from root folder? (Components as root folder)

- Works fine

But <x-login></x-login> or <x-modals-login></x-modals-login> doesn't work. Is there something that can work like this?

May
22
1 month ago
Activity icon

Replied to Deno Within Laravel

Thats what I was looking for thanks :D

Activity icon

Started a new Conversation Deno Within Laravel

What are your thoughts on deno within laravel instead of node? (Will it happen)

Activity icon

Started a new Conversation Stateless (Passport) Vs Stateful (Sanctum)

Stateless (Passport) vs Stateful (Sanctum), what are cons and pros? Which is better?

May
20
1 month ago
Activity icon

Started a new Conversation Best Setup That Is Not Vps For My Project

Hello there.

I am looking for best low-cost shared hosting or laravel forge that can run laravel and vue js. With option to send 100 000 emails per new user registration.

Should I use 3rd party for emails or can it be done within laravel forge or some hosting?

Apr
26
2 months ago
Activity icon

Started a new Conversation Laravel Package For Youtube Api Insert

Is there any php/laravel package for this:

https://developers.google.com/youtube/v3/docs/videos/insert

I would like to allow users to upload videos from my website to my youtube channel.

Feb
25
4 months ago
Activity icon

Replied to Laravel Wherehas With Multi Connection Databases

Almost same thing here. Anyway thanks for helping me with same answer i got. At least I know its right one 😂

Activity icon

Replied to Laravel Wherehas With Multi Connection Databases

Yeah I got problem on joins as well, I figure that out to pluck ids or what ever i need into array and to use where in as you mentioned.

Activity icon

Replied to Laravel Wherehas With Multi Connection Databases

Yes I did that, but mine databases are on different servers. Although it works for relation it doesn't on where has because it converts wherehas to maindatabase.table instead of anotherdatabase.table

Activity icon

Started a new Conversation Laravel Wherehas With Multi Connection Databases

If I am using whereHas on model, that uses another connection. Why does it laravel still look into main connection database for table?

$data = $data->whereHas('medicine', function($query) use ($request) {
    $query->where('SOMETHING');
});

But if I go for $data->first()->medicine it works and simply returns from other database from other connection?

Feb
07
5 months ago
Activity icon

Started a new Conversation How To Catch Phone Apps Requests?

Hello there, I am making some chrome extension for Instagram that shows you some statistics based on your profile and some other things. While working on it basically I saw that I could do any action as on apps if I have endpoints and headers for those endpoints. So I thought about making section for direct messages for website, because there is no one and there is only some 3th party software that "works" for messaging. I would rather use extension right next to other pages that I am visiting.

If not for public use but for my own, and thats why I need a way to check headers and endpoint to fetch messages list, messages itself and way to send messages as well as some sort of listener that instagram uses to append new incoming messages.

Since none of this is available on their website, is there a way to catch these infos?