SkyCoder

SkyCoder

Member Since 1 Year Ago

Experience Points
16,500
Total
Experience

3,500 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
65
Lessons
Completed
Best Reply Awards
2
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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
16,500 XP
Feb
07
1 week 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?

Jan
09
1 month ago
Activity icon

Started a new Conversation How To Publish Views And Group Routes From Jeremykenedy/laravel-roles

How to publish views and group routes from jeremykenedy/laravel-roles ?

Also seems like I need to change every trans() to __() in laravel 6? Why isn't it working like this: trans_choice('laravelroles::laravelroles.cards.users-count', count($item['users']), ['count' => count($item['users'])]) as it comes within package?

Dec
26
1 month ago
Activity icon

Awarded Best Reply on How To Bind Multiple Style With Array In Vue.js

Did you try 'border-top': '5px solid ' + item.cardColor?

Activity icon

Replied to How To Bind Multiple Style With Array In Vue.js

Did you try 'border-top': '5px solid ' + item.cardColor?

Activity icon

Started a new Conversation Update Relations With Relation Data

How could I do this without foreach or each?

foreach($user->posts as $post) {
    $post->update(['name' => $post->name . ' - test']);
}

$user->posts()->each(function($post) {
    $post->update(['name' => $post->name . ' - test']);
});

I was thinking something like:

$user->posts()->update(['name' => 'HOW COULD I ACCESS EACH VALUE FROM COLLECTION?']);

I could use:

DB::raw("UPDATE posts SET name = name + ' - test' WHERE id = userID ")

But is there any direct way from relation?

Dec
04
2 months ago
Activity icon

Replied to Make Collection From First/find/get

Now I clicked on the best answer on purpose :D

Activity icon

Replied to Make Collection From First/find/get

I didn't want to give you the best answer I clicked wrongly but your doesn't work if I pass collection, it just adds collection into collection

Activity icon

Started a new Conversation Make Collection From First/find/get

How could I make collection from first/find as in get?

public function send($notification, $users) {
      collect($users)->each(function ($user) use ($notification) {});
}

If I pass ->send([], App\User::first()) every field turrns into collection, I would like to push that one within new collection or if I pass collection just to use it as it is.

How can I do that?

Nov
22
2 months ago
Activity icon

Started a new Conversation Laravel Vs Lumen For API

Which one should be used for big API apps?

Oct
29
3 months ago
Activity icon

Started a new Conversation Removing Duplicates From Mysql Table With Email Column

I have table with 20k rows that contains some emails and I would like to remove all duplicates.

I tried these:

delete from users using users, users e1 where users.id > e1.id and users.email = e1.email

DELETE FROM users WHERE id NOT IN (SELECT MIN(id) FROM users GROUP BY email)

DELETE e.*
FROM users e
WHERE id IN
 (SELECT id
   FROM (SELECT MIN(id) as id
          FROM users e2
          GROUP BY email
          HAVING COUNT(*) > 1) x);

None of these work, I still have duplicates...

Any ideas?

Oct
18
3 months ago
Activity icon

Started a new Conversation Is There A Way To Extend Env

Is there a way to extend env helper to accept param as env filename with env folder of env files? Case of usage:

I am creating package where I would like to give users full control with models, controllers... Like my package env and config have:

models>modelname>pathToModel::class routes>routeName>routePath etc...

Since config will publish automatically, if they update config will be new.. So I would like to have env file for only my package routes, middlewares, models etc..

So is there a way to make env folder and put env files within it. Where by using env helper to pass path to file for env reading

Oct
17
4 months ago
Activity icon

Replied to Extending Package.json Within Laravel Package

Well I am creating chat app that could be added to any projects that contains users table, with some additional tables. In that case I would do it with just components etc and then add it as option to use chat component if they want or just endpoints for custom frontend.

Oct
16
4 months ago
Activity icon

Started a new Conversation Extending Package.json Within Laravel Package

I am making some laravel package that would use vue.js, vuex and router. How can I include those from laravel package?

Do I need to change webpack.mix as well as app root package.json or is there some quicker way that doesn't require someone to manually install required packages?

Oct
14
4 months ago
Activity icon

Started a new Conversation How T Check Is Param Collection Or Object

I created custom notifications model with two params, notification and user/users. I tried to check if it is object or collection but it always returns as object.

public function send($notification, $users) {
        if(!is_null($users) && is_object($users)) {
          $this->create([
              'user_id' => $notification['user_id'],
              'foruser_id' => $users->id,
              'type_id' => $notification['type'],
              'info' => $notification['info'],
          ]);
        } else if(!empty($users)) {
            foreach($users as $user) {
                $this->create([
                    'user_id' => $notification['user_id'],
                    'foruser_id' => $user->id,
                    'type_id' => $notification['type'],
                    'info' => $notification['info'],
                ]);
            }
        }
    }

How can I check if I passed something like:

User::find($id) or User::where('id', '!=', auth()->user()->id)->get()

Sep
24
4 months ago
Activity icon

Started a new Conversation How To Handle Mass Mail Sending With Queue Timeout

I have table with 100K+ emails where I want to daily send some email:

I added schedule in app\Console\Kernel.php:

$schedule->job(new SendDailyEmails)->dailyAt('09:00');

Inside Job I have:

$users = User::all();
foreach($users as $user){
    Maill:to($user->email)->send(new DailyMail($user));
    $status = 'sent';
    if( in_array($user->email, Mail::failures()) ){
        $status = 'failed';
        Log::error($user->email . ' was not sent.');
    }else{
        Log::info($user->email . ' was sent.');
    }
    SentMail::create([
        'email' => $user->email,
        'status' => $status
    ]);
    
}

This works fine, but after some time this stops probably because job timeout. In failed_jobs table I get MaxAttemptsExceededException with message that Job attempted too many times or run too long. Since I set queue tries max to 3 within supervisor it should and do go 3 times only. And by testing things it did not try to attempt again because I got one mail instead of 3.

So it comes to timeout and I am not sure what is default value but does it matter since I will not know how much time it would take to send all emails?

Should I divide mails into groups of 50 and call separate job instances for each group?

Anyone have a good working answer for this?