erikwestlund

erikwestlund

Member Since 3 Years Ago

Experience Points 31,900
Experience Level 7

3,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 308
Lessons
Completed
Best Reply Awards 1
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.

07 Nov
10 months ago

erikwestlund left a reply on Please Bring Back The Older Laracasts Design

It looks terrific. Very cool design.

07 Dec
1 year ago

erikwestlund left a reply on VirtualBox Or Parallels On Vagrant For MacOS

if you're intent on VMs:

virtualbox is free, and works fine. it's easier to set up and the speed difference with parallels or vmware is not worth it.

you might also consider laradock or vessel, docker solutions which are more lightweight and will give you a little practice with containers.

i'd personally recommend trying valet w/ native php/mysql. fast, easy, and i've built some pretty complicated apps and never really had major issues translating them from mac to ubuntu server environment.

23 May
2 years ago

erikwestlund left a reply on How Do I Start A Project With An Already Built Database?

Also agree with re-seeding a new DB with the old data, renamed and reorganized how you like it. It's worth your time.

15 Nov
2 years ago

erikwestlund left a reply on Laracasts Refresh

@Jeff , Another issue I just noticed. On mobile, the hamburger works once, and then the menu keeps coming back. I can make it stop if I hold down the hamburger longer than usual, but it's unnatural.

iPhone 7 plus on chrome.

01 Sep
3 years ago

erikwestlund started a new conversation Gulp Watch With Elixir 6 - Stream.js Throws Error

I get the following error:

stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: ENOENT: no such file or directory, stat '.../public/build/assets/js/admin-a30ce533d9.js'
    at Error (native)

I found this:

https://github.com/ben-eb/gulp-cssnano/issues/23

Any hints?

erikwestlund left a reply on Can Elixir V6 Be Used With Laravel V5.2.??

Yes, you can. I used it before 5.3 was released. Edit your package.json so it looks something like the following. Then I'd just rm -rf node_modules and npm install.

Easier way is probably to remove the Elixir stuff from package.json and run npm install laravel-elixir --save-dev

...

...
"devDependencies": {
    "gulp": "^3.9.1",
    "laravel-elixir": "^6.0.0-10",
    "laravel-elixir-vue": "^0.1.6",
    "laravel-elixir-webpack-official": "^1.0.2",
    "vue-awesome": "^0.3.0",
    "vue-html-loader": "^1.2.3"
},
...
09 Jul
3 years ago

erikwestlund left a reply on Guide: Add Webpack To Your Laravel-Elixir Ext For Vue Js Components

@miran, I'm using it now. I just updated my package.json to 6.0.0.0 and things more or less just work. working out some webpack bugs but so far so good!

08 Jul
3 years ago

erikwestlund left a reply on Share Models Between Two Laravel Projects

Just bumping this to say thanks for the idea. @Raph's method worked for me. Here's my situation:

Laravel install for the main app Lumen as a worker app that handles various tasks behind the scenes. This runs on a separate server.

I share models between these. It worked fine just created them by hand and keeping them in sync but that just seemed so dirty.

I set up a private composer package with App\ as the namespace, added the repo to both my composer.json files, and things work fine.

It's a little annoying to have to commit, push, and run composer update to reflect changes in models, but I only have to do this sometimes.

01 Jun
3 years ago

erikwestlund left a reply on Best Hosting For Laravel Based Retail Site?

Linode has managed services which I've used. I found them disappointing.

DigitalOcean has nothing.

AWS has some managed-ish services, but they are very expensive.

Maybe Rackspace is what you need.

Me, personally, I find AWS to be the most robust platform to set up secure and scaleable sites. I'd hire someone to set up a solution with AWS and manage flaps when they happen. I've used and run sites on DO, Linode, and AWS.

Perhaps deploy on AWS through Forge w/ Envoyer and pay someone else to make sure you take advantage of what AWS has to offer.

From what I see, I do not think you need managed services once you get settled.

erikwestlund left a reply on Fast Way Using Storage API To Get File Size/modified Time In Bulk?

@jimmck, I think we are on exactly the same page about things :)

It would be a useful option in the files/allFiles methods on the Storage classes to retrieve metadata with the retrieved files (kind of like an ls -a command!), although I guess it might become difficult/possibly non-performant across different platforms to implement interchangeably.

erikwestlund left a reply on Fast Way Using Storage API To Get File Size/modified Time In Bulk?

@jimmck, I profiled how long these queries take. We are talking 14 seconds over network for 65 files vs 0.01 seconds when cached.

Also, calls to S3 from EC2 are not local. They are still going over private network in AWS infrastructure. It's the difference between calling database on actual EC2 instance vs a database server in same network. Both will be plenty fast. However, once you move out of local network, trouble begins (e.g., dev server, or you deploy to EC2 instance outside where S3 bucket located, etc.)

You want one S3 bucket which can then be sent to CDN or whatever. If you deploy server in different availability area than S3 bucket it will be slow again. Which reveals why it will be important to somehow make a bulk query (or cache, which is a good solution since I don't think there's an API call baked into storage driver/S3 adapter to get file metadata in bulk/batch.

erikwestlund left a reply on Fast Way Using Storage API To Get File Size/modified Time In Bulk?

@jimmck, yes, it has that information, but everytime you run $disk->size it makes another API call to S3, which is inordinately slow. In the codeblock you showed, if the folder had 100 files in it, you'd end up making 201 calls to AWS. 1 to get the file list, 100 to get file dates, 100 to get sizes. Each iteration makes another call. Probably trivial on local storage, but on the cloud its slow.

erikwestlund left a reply on Fast Way Using Storage API To Get File Size/modified Time In Bulk?

Beautiful! Laravel is so good. I add:

    $cache_key = 'file_details-' . $path;

    if(Cache::has($cache_key)) {
        return Cache::get($cache_key);
    }

And below, I get all the file details (expensive) and add this:

    Cache::put($cache_key, $file_details, config('site.file_metadata_cache_store'));

And... voila. I now can capture all the file information in 0.01 seconds :)

I'll have to add cache busting for file modification functions but this works well. Thanks for tipping me off.

erikwestlund left a reply on Fast Way Using Storage API To Get File Size/modified Time In Bulk?

@ohffs I might give this a try -- good way to test out redis, which I'll need to use later in this app. How would you approach purging stale cache?

erikwestlund started a new conversation Fast Way Using Storage API To Get File Size/modified Time In Bulk?

I'm writing a little file manager app for a site I'm working on. We want the file manager to map directly onto S3.

While S3 responds pretty fast, performance wise we want to make as few requests to S3 as possible. For example, to process a directory, and give a file tree, we need to make at minimum two calls, one to get the directories subdirectories, and another get the directories subfile. That takes less than 0.3 seconds.

However, as far as I can tell, the API for the Storage features do not have a way to get file metadata (e.g., size, modified date) in bulk. Thus, if a directory has like 50 files, it makes two calls, one for files, one for direcgtories. But to get that metadata it has to make 100 more calls, one each for modified and size. That amazingly only takes 10 seconds on my dev machine but it's unacceptably slow.

Any ideas on how to approach this?

09 May
3 years ago

erikwestlund left a reply on Remote Database Connection

Yes. For example, I have one nano instance on AWS that I use for development databases. This makes it easy for me to use vagrant on my laptop and desktop, in OS X and Linux. I then use Dropbox to sync my apps across the devices. This way I can work on the same project seamlessly across computers.

It will be slow, however, and most likely unacceptably so for a production environment.

Anyway, you can edit your .env file

DB_HOST=123.123.123.123

Where 123.123.123.123 is your host database.

You'll need to make sure that your host database accepts remote connections. Otherwise it's as simple as that.

erikwestlund started a new conversation Conditional Redirect Path On Register/login

My app has two main sections, but one register section.

Sometimes when people register/login, I want to send them back to where they came from (e.g., forum, app dashboard, etc.)

Is there an easy way to do this with Laravel 5.2's auth controller? Now, I only know how to return people to a single path using the protected $redirectTo = '/foo' property.