bugsysha

bugsysha

Member Since 4 Years Ago

Experience Points 142,175
Experience Level 29

2,825 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 1268
Lessons
Completed
Best Reply Awards 20
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

29 Aug
7 months ago

bugsysha left a reply on Fetch And Load Component From S3

It turns out that is bit more complicated than I wanted it to be so I went with http-vue-loader.

Cause of webpack I had to change export default {} to module.exports = {}.

Also removed imports and map helpers

computed: {
-   ...mapGetters({
-       // ...
-        }),
+   this.$store.getters['moduleNamespace/getterName']
}
27 Aug
7 months ago

bugsysha left a reply on Fetch And Load Component From S3

Please stop. Thank you for your concern but it's totally unnecessary.

bugsysha left a reply on Fetch And Load Component From S3

The issue is that you've assumed that it will contain executable code while the truth is that it will not. It will only display content, nothing more.

bugsysha left a reply on Fetch And Load Component From S3

@cmdobueno Thanks. You are the best.

bugsysha left a reply on Fetch And Load Component From S3

Project requirement is that users can upload vue single file components to the S3 and from there we need to fetch them and use to render pages.

bugsysha started a new conversation Fetch Component From S3

Is it possible to fetch components from S3? The code is just a dummy code since I have no idea how to do it.

<template>
    <div class="parent">
        <h1>Parent</h1>

        <component :is="componentName"></component>
    </div>
</template>

<script>
import axios from 'axios'
import Vue from 'vue'

export default {
    created() {
        axios.get('dynamic-component-url')
            .then(response => {
                Vue.component(data.name, (resolve) => resolve(response.data.component))
            })
    }
}
</script>
19 Jun
10 months ago

bugsysha left a reply on Change Routing According To Previous Visited Page

Create middleware for that shippingInfo page put it before auth middleware for that route. There you can see if he is authenticated and let him to go to shippingInfo page. If he is not authenticated redirect him to the auth page with intended query param. Check for that query param or add another middleware which will take responsibility to redirect accordingly.

This does not look to me like a question for Code Review forum category but what do I know :)

14 Jun
10 months ago

bugsysha left a reply on I Have Made A Base Controller To DRY My API Controllers, I Would Like Some Feedback

i was afraid my post was going to be ignored That happened to me too many times. It is time to give something back :)

It gets kind of cloudy when i try to imagine it I know exactly what you are trying to say. Only experience can remedy that. I always thought that some people are at level I can not reach, ever, not in one life time. But then I've realized that it boils down to experience.

i found out that my controllers are pretty much the same as it was at the start of that video We've all wrote them so don't worry. Follow Adam he is great.

Now i know why Route::resource is used. I always used only resource controller boilerplate and it never failed me. Get that into your workflow and in no time you will see progress.

It was a good reply ! Thank you. My pleasure.

bugsysha left a reply on I Have Made A Base Controller To DRY My API Controllers, I Would Like Some Feedback

Too much abstraction, magic, and automation.

I like implicit model binding, request objects validation. Takes controllers cleanliness to the extreme.

Dedicated controllers are a must in real-world apps since every model has different relationships and it's better to have all the logic in the app than to outsource for example cascade delete to the database. What if you switch to some database that does not support it? It would get very dirty to put that logic in the controller you wrote. Also overwriting base controller methods is not a common pattern and it can be overlooked easily especially by new team members.

This is just an excerpt but there is so much that would bring complexity and headache if you go with this snippet of code.

I think I've heard @JeffreyWay say that programmers (especially juniors) are hesitant to create new classes and they tend to put everything in existing structure/files. This might now apply to you but it gave me that impression.

Sorry if my thoughts are confusing. I lack some serious amount of sleep.

13 Jun
10 months ago

bugsysha left a reply on I Have Made A Base Controller To DRY My API Controllers, I Would Like Some Feedback

It would be so much easier to review if it was posted on GitHub or something. Looks super clean but I do not like it. I think that you should watch this video https://www.youtube.com/watch?v=MF0jFKvS4SI

Hope it helps.

05 May
11 months ago

bugsysha started a new conversation Dynamic Component Loading Causes Laravel Mix To Loop

Since I do not know what template names will be added in the future I'm loading requested component like this

let template = require(`./../../../../../${this.templateName}/index.vue`)

But that causes Laravel Mix in watch mode to compile over and over again

WAIT Compiling...

10% building modules 0/1 modules 1 active .../user/project /^\.\/.*\/index$/

So it drains my battery like I'm running benchmarks.

Any ideas how to solve this or what other approach to try?

Thanks in advance.

28 Nov
1 year ago

bugsysha left a reply on Global EventBus Testing Problem

It can be solved with Vue.mix by adding global method, but I'm asking for this approach cause what if you have something like jQuery or something in your Vue component....

24 Nov
1 year ago

bugsysha left a reply on Global EventBus Testing Problem

It didn't help. Same thing. If that was the issue then it wouldn't work on my website either. This issue is only happening when running tests.

23 Nov
1 year ago

bugsysha started a new conversation Global EventBus Testing Problem

I have global EventBus in my app.

window.Event = new Vue

But when I try to follow along https://laracasts.com/series/testing-vue/episodes/6 I can not surpass TypeError: Event.$on is not a function error when running tests.

Any ideas?

Thanks.

26 Sep
1 year ago

bugsysha left a reply on Turbolinks Breaks Twitter Bootstrap Navigation

I guess that should solve this issue. I know I solved it but cannot recall how. Hope this will help someone and thanks ;)

17 Jan
2 years ago

bugsysha left a reply on PHPStorm - Order Use Statements By Length

@ellisio my colleague and I made it for the company that we worked for. After that we decided to sell it to try to gather some funds for other free projects that we work on. If this is against the rules of the forum then I'll delete the post. I hope no one will think of this as self promotion.

https://sorter.kraftvel.com

I'm looking forward to some comments.

14 Dec
2 years ago

bugsysha left a reply on Migration From Different Folder.

I always create Service Providers and with them register custom folder for migrations. Have you tried that?

bugsysha left a reply on PHPStorm To Sublime

I didn't find anything for that problem. Please post here if you find something interesting.

bugsysha left a reply on Can Anyone Identify This CSS Framework

I agree with you, but that would take too much time at this point. Anyway thanks for encouraging words :)

bugsysha left a reply on Can Anyone Identify This CSS Framework

CSS is not a problem for me. I do not have an eye of a designer so other elements would not look alike with this one.

bugsysha left a reply on Can Anyone Identify This CSS Framework

Don't like Bulmas checkbox and select styling.

bugsysha left a reply on Can Anyone Identify This CSS Framework

I probably will end up using it, but I need the rest like Select, Nav, and other HTML tags and my styling abilities are not the best so I will fail for sure trying to match that styling.

bugsysha left a reply on Can Anyone Identify This CSS Framework

You broke my heart :(

Is there any CSS framework that looks similar to this one?

bugsysha started a new conversation Can Anyone Identify This CSS Framework

This Todo app look great by my standards. Does anyone know is this styling part of some CSS framework or not?

http://todomvc.com/examples/vue/

Thanks

01 Dec
2 years ago

bugsysha left a reply on Test-Driven Laravel By Adam Wathan Is Very Good!!!

Everyone can watch his other talks and tutorials and decide if it's right for them.

13 Nov
2 years ago

bugsysha left a reply on Different Account Type Users

@shez1983 Don't worry. I didn't signup here to have a war with someone.

First you call the OP a newbie and then you tell me that I should bother him with details so he has to change his whole app that he wrote so far? Please make up your mind. And confirming what is right will "jeapordise" the app? Are you real?

And also telling someone who you do not know "please dont hide behind English" and "dont gloat" is just an example how much you "respect" others since you started your first reply in this thread with that word that has no value.

if all you have is a hammer, everything looks like a nail.

@mbpp Just like I wrote, I often think that users just start topics and find answers somewhere else. And my suggestion was not to trust your users. Keep as much logic as possible in backend so users can not manipulate the front end. Thought that your question was related to hidden input and not to database structure.

12 Nov
2 years ago

bugsysha left a reply on Different Account Type Users

If you can guess skill level of every user by their often poorly described problems then you should go and teach at some college. My first answer is always short cause very often user just ask a question and find answers after using laracasts or google search. But if the user comes back and says if I can elaborate then I can do that and help them.

And this is also an exercise for me to better understand new programmers so I can help them since english is not my native language and sometimes I have problems with that.

And I do not see how my answer is not related or it does not answers to OPs question. I'm just offering a path, cause someone else might suggest something that will be better for him. So once again if he asks me to elaborate I can do that.

bugsysha left a reply on Database Backup (Changes Only)?

Easiest solution would be to dump the database and rsync it to your S3 location.

bugsysha left a reply on Revisiting A View Updated With Ajax (Back Button)

I'm using cache for that. On every ajax request I overwrite cache, and you can overwrite cache when you submit search. So when he goes back cache content will be served. You just need to figure out how to pull the info from cache that will point out which filters were selected but that is not hard also.

bugsysha left a reply on How To: Remove No More Necessary Features?

Yes, that is the way. You can also use dropIfExists.

bugsysha left a reply on Different Account Type Users

Create EmployerController and CandidateController. That way you do not need to pass hidden input.

bugsysha left a reply on How To: Remove No More Necessary Features?

Not sure what you're asking, too little info.

bugsysha left a reply on How To: Remove No More Necessary Features?

Drop table.

Schema::drop('flights');

Drop column.

Schema::table('users', function ($table) {
    $table->dropColumn('votes');
});
10 Nov
2 years ago

bugsysha left a reply on Develop Entiere L5 App With Packages Only

I only do it that way for the same reason.

bugsysha left a reply on Difference Between Import And Require

But he is asking for JavaScript not PHP?

09 Nov
2 years ago

bugsysha left a reply on Automatically Adding ServiceProviders Laravel To Config/app.php And Autoload Config

You can put it in some new package for example in that packages ServiceProvider in register method.

bugsysha left a reply on Count Number Of Items In Queue That Match Specific Rules? $10 For Solution

I'll send the person who solves this a $10 amazon card That is a bribe :D

bugsysha left a reply on Automatically Adding ServiceProviders Laravel To Config/app.php And Autoload Config

Loop through folders and find ServiceProviders and add them with

$this->app->register()

bugsysha left a reply on Difference Between Import And Require

Short answer is require is javascript library https://www.npmjs.com/package/require-dir but import is ES6 function. Also require is synchronous and import is a synchronous.

08 Nov
2 years ago

bugsysha left a reply on Best Practices CSS Spacing And Positioning?

I use something like this so I can manipulate it through HTML

$spacingValue: 1rem;
$maxWidthSize: 991px;
$smallScreenDivider: 2;

@include component(spacing) {
  @for $i from 0 through 16 {
    @include option(s-margin-#{$i}) {
      margin: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-#{$i}) {
      padding: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // top bottom
    @include option(s-margin-top-bottom-#{$i}) {
      margin-top: $i * $spacingValue;
      margin-bottom: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-top: $i * $spacingValue / $smallScreenDivider;
        margin-bottom: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-top-bottom-#{$i}) {
      padding-top: $i * $spacingValue;
      padding-bottom: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-top: $i * $spacingValue / $smallScreenDivider;
        padding-bottom: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // left right
    @include option(s-margin-left-right-#{$i}) {
      margin-left: $i * $spacingValue;
      margin-right: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-left: $i * $spacingValue / $smallScreenDivider;
        margin-right: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-left-right-#{$i}) {
      padding-left: $i * $spacingValue;
      padding-right: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-left: $i * $spacingValue / $smallScreenDivider;
        padding-right: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // top
    @include option(s-margin-top-#{$i}) {
      margin-top: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-top: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-top-#{$i}) {
      padding-top: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-top: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // right
    @include option(s-margin-right-#{$i}) {
      margin-right: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-right: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-right-#{$i}) {
      padding-right: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-right: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // bottom
    @include option(s-margin-bottom-#{$i}) {
      margin-bottom: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-bottom: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-bottom-#{$i}) {
      padding-bottom: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-bottom: $i * $spacingValue / $smallScreenDivider;
      }
    }

    // left
    @include option(s-margin-left-#{$i}) {
      margin-left: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        margin-left: $i * $spacingValue / $smallScreenDivider;
      }
    }

    @include option(s-padding-left-#{$i}) {
      padding-left: $i * $spacingValue;

      @media (max-width: $maxWidthSize) {
        padding-left: $i * $spacingValue / $smallScreenDivider;
      }
    }
  }

  @include option(s-vertical-middle) {
    display: flex;
    align-items: center;
  }
}

I use CSStyle.

bugsysha left a reply on Stripe. No API Key Provided

Glad it works. Please select it as a correct answer so others can see that and try when they have the same problem.

07 Nov
2 years ago

bugsysha left a reply on Stripe. No API Key Provided

Paste code where you create requests from backend.

bugsysha left a reply on Stripe. No API Key Provided

Have you added to keys to .env file?

06 Nov
2 years ago

bugsysha left a reply on PHPStorm - Order Use Statements By Length

Yes there is but it's not free.

29 Oct
2 years ago

bugsysha left a reply on How To Push An Array Into A Session

Fetch items from the DB and key them with this:

$items = \App\Item::all()->keyBy('id');