youkaihiei

youkaihiei

Senior Developer at Urge Interactive

Long Beach

Member Since 4 Years Ago

Experience Points 31,020
Experience
Level
Lessons Completed 425
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

10 Aug
4 months ago

youkaihiei left a reply on Instantiating Objects

I would pass them in as arguments

31 Mar
8 months ago

youkaihiei left a reply on Unable To Test Filesystem TemporaryUrl

In FilesystemAdapter.php I added the following to the beginning of the temporaryUrl() method (line 463):

if (env('APP_ENV') === 'testing') {
    return $path;
}

The Storage::fake('s3'); stuff just creates a local disk with the name you give it which is why the temporary url bit throws the error in testing (the local adapter doesn't have a temporaryUrl() method). Probably not a good or long term fix, but it works.

18 Aug
2 years ago

youkaihiei started a new conversation Collection::jsonSerialize Bottleneck

Hey all!

I'm working on a Laravel 5.2 api and according to New Relic the bottleneck in response time I'm experiencing is the jsonSerialize() method on Illuminate\Support\Collection - its serializing about 1500 models returned by the query thats executing, which doesn't really seem like a lot to me. But I don't know, maybe it is haha. Each model has maybe about 25 properties. Has anybody experienced anything like this before? Any advice on dealing with it? (other than caching)

10 Sep
3 years ago

youkaihiei left a reply on Calculating Sectors Of Circles Around A Latitude & Longitude W/ PHP

Thanks for the response! Its related but not necessarily what I'm after.

Forgive the photoshop skills haha but http://www.nathanielthomas.net/images/ltlngexample.jpg

The white dot in the middle is a latitude/longitude. A and B are each sectors of the circle made up of the radius around the circle (lets say 5 miles), so A is 0 degrees to 180 degrees and B is 180 degrees to 360 degrees, 5 miles away from the middle. The yellow dot is another latitude/longitude.

Right now I have this generated using the google maps api using the polygon plugin and the geometry plugin to find out if a given latitude/longitude falls inside of a polygon.

I'm trying to find out if theres an equivalent way to do that sort of thing in PHP.

youkaihiei started a new conversation Calculating Sectors Of Circles Around A Latitude & Longitude W/ PHP

Hey everybody! Figured I'd try asking this here as a couple of days of wandering around stackoverflow hasn't proven very successful.

I'm basically building an angularjs front end/laravel back end application and want to know if what I'm currently using the Google Maps API for can be done with a PHP package or something.

I'm using it to draw sectors around a latitude and longitude (for example, two sectors would be two halves of a circle) and then determine whether or not another latitude and longitude falls inside of which sector.

04 Mar
3 years ago

youkaihiei left a reply on Laravel 4 From Scratch

Hey there :)

I highly recommend using Homestead as your virtual machine to make your practice projects on. The reason you're getting those errors is because you need mcrypt installed, which you don't because you're running the installation script on your regular machine.

http://laravel.com/docs/5.0/homestead

Also it looks like you might be trying to install laravel 5. If you're going to use laravel 4, http://laravel.com/docs/4.2/installation

youkaihiei started a new conversation MySQL & Scaling

Not necessarily a Laravel question but hopefully someone with more experience could provide some insight into some issues I've been having with executing a whole bunch of SQL queries efficiently.

Basically my situation is this. This is on WordPress and WooCommerce on my Homestead 2 local environment. I have a CSV with roughly 10,500 rows - they're all just sets of skus and a stock number to be updated. The bit I put together to parse the CSV is pretty quick when I have it just echo out each sku, it takes between half a second to one second to finish.

The issue comes when I try to have it update the database for each record - it times out with nothing written to any error files I can find. The same thing happens when I just try retrieving the product id by its sku. I imagine this has to do with the fact that its trying to perform a whole bunch of operations at once.

Before I started trying to improve its performance it worked but took forever (between 20 minutes to a half hour) to run entirely and when I tried to make it write to a file when finished for testing (for example, how many skus had their stock updated) it didn't seem to make it that far.

I've tried using wpdb, pdo, and wp_query with no success.

I have similar issues when trying to use the REST api to get all of the products out of the database (a third party wants them), cURL would time out and I would increase the CURLOPT_TIMEOUT but I don't think thats a very sustainable fix as I imagine the time it takes to get all of the products would increase as more products are added and I'd have to go in and increase the timeout limit again. 20 products works just fine, all 300 and their variations not so much.

Anyways, any help or insight would be greatly appreciated :) thanks!

03 Mar
3 years ago

youkaihiei left a reply on Laravel 4.2 / Homestead 2.0.6 Mime Types Issue

Haha oh man, stupid mistake on my part. I had the 404 route going to the index view and had the URL to the asset wrong, so it was returning that instead of an actual error. Thanks for pointing me in the right direction! :)

youkaihiei left a reply on Laravel 4.2 / Homestead 2.0.6 Mime Types Issue

Lines 26 and 27

include /etc/nginx/mime.types; default_type application/octet-stream;

youkaihiei started a new conversation Laravel 4.2 / Homestead 2.0.6 Mime Types Issue

Hey there!

After about a day of trying to figure this out I'm stumped. Basically I have a laravel application (4.2) on Homstead 2.0 and when I try loading javascript assets they're being sent from the server with the wrong mime type; for example loading jQuery from the site doesn't work and the console says "Resource interpreted as Script but transferred with MIME type text/html: " but using the CDN works. It sounds like the same issue this guy is having http://stackoverflow.com/questions/28612354/homestead-responding-mime-type-text-html except I haven't moved the project from OSX to Windows.

Any help figuring out whats up with that would be greatly appreciated :)