hvs

hvs

Member Since 4 Years Ago

Experience Points 2,335
Experience Level 1

2,665 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 71
Lessons
Completed
Best Reply Awards 0
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.

18 Apr
3 months ago

hvs started a new conversation Multiple Variants Of Same App...how To Manage

We have a partner for whom we are going to build a white label app that is very similar to our own app. The core functionality will be the same. There will be minor changes in the UI and some significant changes in user authentication.

I was wondering how to manage this type of a situation. Creating a source code branch would be too difficult to manage, I think.

I was thinking more along the lines of having a common app with some logic built into the routing based on the IP address of the server. Is this a good idea?

13 Sep
10 months ago

hvs started a new conversation How To Get All Headers Using Laravel Dusk

Hi. How to get all URLs and headers for these URLs when I follow redirects. Is this possible ?

30 Dec
3 years ago

hvs left a reply on Forum Software

It has been a year since the thread was updated. Any chance that we will see the source code for the forum in the near future?

02 Oct
3 years ago

hvs left a reply on EC2 Management Via Forge

Thanks for responding but no one appears to know. There is no option to contact the developers of forge on their website either (which is kind of odd).

29 Sep
3 years ago

hvs started a new conversation Ajax Request Throwing 405 Method Not Found Error

I am making an ajax call from a form to send the checkbox data to a controller. Here is the relevant html code:

 <form method="POST" action="http://192.168.1.25/nonresponsiveurl" accept-charset="UTF-8" class="del_form" id="del_form" name="del_form"><input name="_token" type="hidden" value="igr6iMt1WfeZunyG8wpyy1tNK1efgiclyOvZ1hkF">
  <input id="submit" type="submit" name="submit" value="Delete Checked Records" onclick="return submitDelForm();">
   <div class="table-responsive shadow-edge-nofill">

    <table class="table table-striped">
                    <tbody>
                    <tr>
            <td><input id="badURL0" class="bad_url_checkbox" name="bad_url_checkbox" type="checkbox" value="2"></td>

etc....etc.....etc....

    </form>

Here is the relevant javascript code:

  <script type="text/javascript">
    function submitDelForm(){
        $('div#loadmoreajaxloader').show();
        var form = document.del_form;
        var dataString = $(form).serialize();
        $.ajaxSetup({
            headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
        });
        $.ajax({
            type: 'POST',
            URL: '/delbadurl',
            contentType: "application/json; charset=utf-8",
            data: {'serial_data' : dataString},
            success: function(data){
                $('div#loadmoreajaxloader').hide();
            }
        });
    }
</script>

Here is relevant routing:

  Route::post('delbadurl','Admin\DashboardController@delBadURL' );

I can confirm that CSRF token is being appended to the dataString. The form data is being appended to the dataString as well. However, jquery throws 405 error.

I am using many other ajax functions to fetch the data. Everything works perfectly except this particular function. Some pointers will be greatly appreciated as I am coming empty handed.

22 Sep
3 years ago

hvs left a reply on How Do You Read Json Object In A View?

Thanks. I am going to process it through jquery ajax request.

21 Sep
3 years ago

hvs left a reply on QUERY BUILDER USING DB::Raw

Try using whereRaw instead of where

hvs started a new conversation How Do You Read Json Object In A View?

The controller I have returns the following:

 return response()->json(['html' => $html, 'logs' => $logs, 'date_range' => $date_range])

How can I access above data in my view?

25 Aug
3 years ago

hvs started a new conversation EC2 Management Via Forge

I have an app that is using EC2 machines on AWS. The database is hosted on an RDS instance.

I was looking at Forge for managing and scaling of EC2 instance. It appears to me that you need to use custom VPS option on Forge to provision EC2 machine. I am assuming that I should be able to deploy the app via Forge after provisioning.

However, I am not sure how do you horizontally scale your system? Do I need to use the elastic load balancer on AWS? or just create multiple instance of EC2 and provision via Forge and let Forge handle the load balancing?

Thanks

10 Jun
4 years ago

hvs started a new conversation How To Write This In Eloquent Or Query Builder For That Matter?

SELECT *
FROM   creatives
WHERE  creative_id IN (SELECT   creative_id
                       FROM     term_relationship
                       WHERE    term_id IN (1, 2, 3)
                       GROUP BY creative_id
                       HAVING   COUNT(*) = 3)

hvs left a reply on How Do You Create Complex Database Filters Using Eloquent?

@bobbybouwmann . Your solution will not work. The correct Mysql query will be

For Scenario 1

SELECT *
FROM   creatives
WHERE  creative_id IN (SELECT   creative_id
                       FROM     term_relationships
                       WHERE    term_id IN (1)
                       GROUP BY creative_id
                       HAVING   COUNT(*) = 1)

For Scenario 2

SELECT *
FROM   creatives
WHERE  creative_id IN (SELECT   creative_id
                       FROM     term_relationships
                       WHERE    term_id IN (1, 2)
                       GROUP BY creative_id
                       HAVING   COUNT(*) = 2)

For Scenario 3

SELECT *
FROM   creatives
WHERE  creative_id IN (SELECT   creative_id
                       FROM     term_relationships
                       WHERE    term_id IN (1, 2, 3)
                       GROUP BY creative_id
                       HAVING   COUNT(*) = 3)

I don't have a prior knowledge of how many filters will be selected by the user.

So how do you build this query in Laravel? I can use Raw query but really don't want to if it can be done more elegantly. Thanks

09 Jun
4 years ago

hvs left a reply on How Do You Create Complex Database Filters Using Eloquent?

:( My tables are all messed up. Not sure how to fix them

hvs started a new conversation How Do You Create Complex Database Filters Using Eloquent?

I have following 2 tables Table 1: creatives | creative_id | creative_name| |----------------- | ----------------------| | 1 | xyz | | 2 | abc | | 3 | pqr |

Table 2: term_relationships

| creative_id | term_id | |----------------- | -------------------| | 1 | 1 | | 1 | 2 | | 1 | 3 |
| 2 | 1 | | 2 | 2 | | 2 | 4 |
| 3 | 1 | | 3 | 2 | | 3 | 3 |

I want to join the above 2 tables under certain conditions. Here are some scenarios:

  • Show me creatives for which term_id =1 (relatively easy to do)
  • Show me creatives for which term_id = 1 AND term_id =2 (output should be xyz, abc and pqr)
  • Show me creatives for which term_id = 1 AND term_id = 2 AND term_id =3 (output should be xyz and pqr)

I am not sure how to do this in eloquent. Is it doable or should I resort to query builder ?