ShaneTurner

ShaneTurner

Member Since 5 Years Ago

Auckland

Jack of all trades at A desk in my living room

Experience Points 78,410
Experience Level 16

1,590 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 851
Lessons
Completed
Best Reply Awards 0
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.

30 Nov
4 months ago

ShaneTurner left a reply on Stuck: Need Help With Terminology, Multiple External API

Great! That's just the lifeline I need. I'll toddle off and go explore Contracts.

ShaneTurner started a new conversation Stuck: Need Help With Terminology, Multiple External API

I've reached a point on a project where I'm stuck, and I think it's probably due to not knowing the right terminology to search for.

What I need to do is access external services via API. In this case, it's shipping. The customer buys a product and depending on the product type, a different shipping provider is used, and also a different external API.

Ie they order Ice Cream and need it delivered immediately so provider A is used, another time they order a large boulder, so provider B is used.

Internally I want to use the one API, that then uses the correct API externally depending on the product.

So, what's this concept called? Or even more awesome, are there existing tutorials for it?

28 Aug
7 months ago

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

Solved the issue.

It turned out to be my shell. ZSH in this case. No idea what or why.

27 Aug
7 months ago

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

For some reason it was persisting the environment variables to the system, and they were taking precedence.

I couldn't figure out why, or how to stop it. So I nuked the HDD.

Got a fresh OS, and the problem has magically vanished. I guess the cause will remain a mystery.

But for historical records:

Laravel: 5.6* Tests were stock, with one simple create user, update user, verify name on page. No custom setUp or teardowns.

26 Aug
7 months ago

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

Anyone else got some suggestions, I just can't figure this one out.

Could always go the ol' reliable clean slate rebuild on the OS.

23 Aug
7 months ago

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

Hmm.

Right made alternative bootloader file testautoload.php

Same content but with an additional global variable to test.

$GLOBALS['bootload'] = "Testing New Loader";

And in the test file:

dump($GLOBALS['bootload']);

Running phpunit prints: "Testing New Loader", so at least I now know that the phpunit.xml is being read.

But it would appear system variables are somehow still being set and overriding the ones specified in the phpunit.xml file.

22 Aug
7 months ago

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

Usually from the command line. With and without the config flag using absolute path.

Most frustrating. Can't run tests because they nuke my live dev database.

ShaneTurner left a reply on Phpunit.xml Not Being Read, Using Variables From .env

Thanks for that.

Tried

dump(config('app.env'));

But got the same result: "local"

ShaneTurner started a new conversation Phpunit.xml Not Being Read, Using Variables From .env

I can't get tests to run from a testing environment, they always seem to run using the 'local' variables set in the .env file rather than the settings in phpunit.xml

I've run.

php artisan config:clear

my phpunit.xml

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="vendor/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false">
    <testsuites>
        <testsuite name="Unit">
            <directory suffix="Test.php">./tests/Unit</directory>
        </testsuite>

        <testsuite name="Feature">
            <directory suffix="Test.php">./tests/Feature</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./app</directory>
        </whitelist>
    </filter>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="CACHE_DRIVER" value="array"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="QUEUE_DRIVER" value="sync"/>
        <env name="MAIL_DRIVER" value="array"/>
        <env name="DB_CONNECTION" value="sqlite"/>
        <env name="DB_DATABASE" value=":memory:"/>
    </php>
</phpunit>

But if I echo out the APP_ENV variable in testing

dump(env('APP_ENV'));

I still get it showing "local"

Anyone run into this problem before?

03 Apr
2 years ago

ShaneTurner left a reply on 101

Usually, your first class on any subject in university/college is called 101. This is generally the introductory class.

eg. Math 101, CompSci 101, Cake Baking 101 ...

25 Mar
2 years ago

ShaneTurner left a reply on Permissions In Ubuntu

Why not write yourself a script that does it?

20 Mar
2 years ago

ShaneTurner left a reply on Solved - Changing SPARK Favicon

Could this be due to the mime type being SVG but the asset is a PNG?

11 Mar
2 years ago

ShaneTurner left a reply on Tired Of Hearing Don't Re-invent The Wheel

Glad you have unlimited time on your hands. Most of us don't.

15 Feb
2 years ago

ShaneTurner left a reply on Site Just Massively Broke?

Looks like a sneaky Ninja fixed it :)

18 Dec
2 years ago

ShaneTurner started a new conversation Build Tools

Is there a good reason that our current generation of build tools, Gulp, Grunt, WebPack, are all JavaScript / Node based. I seem to recall ruby used to be the language of choice a while back, but is there any reason this can't all be done in PHP as well? Is it the way the languages work? Threading? Or sheer momentum?

ShaneTurner left a reply on How To Integrate Wordpress Into Laravel Application

I believe WordPress has a plugin that exposes an API that you could then use to access your post data. Or if they're hosted on the same machine, directly access the WordPress database.

P.S. I only know that these features exist from talking to my colleagues. I don't use wordpress.

15 Nov
2 years ago

ShaneTurner left a reply on Laracasts Refresh

Great design! Feel nice and roomy. Everything is a bit larger, but I don't have young eyes anymore, so it's much easier to read. Cheers!

12 Nov
2 years ago

ShaneTurner left a reply on Saas Tutorial?

And +1

22 Oct
2 years ago

ShaneTurner left a reply on WTH? Lesson Discussion Signin?

I've noticed Jeffrey has been integrating a lot of external services lately, as the normal forum shows. Just give the poor guy time to make it, and I'm sure you'll see it eventually.

And honestly, I much prefer more screen casts.

ShaneTurner left a reply on WTH? Lesson Discussion Signin?

The comments section uses Disqus. Though I think you can sign on with standard Facebook/Twitter/Google social logins as well.

Is this what you're asking about?

17 Oct
2 years ago

ShaneTurner left a reply on Sublime Text Definitions Popup

To remove the node_modules from your search path, but not your sidebar include the following in your Preferences.sublime-settings file.

I've included bower_components as well.

"binary_file_patterns": [".svn/", ".git/", ".hg/", "CVS/", "node_modules/", "bower_components/"],

To remove from your sidebar as well use

"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]

ShaneTurner started a new conversation Sublime Text Definitions Popup

I've been searching for a way to remove code within the node_modules folder from showing up in the code definitions popup. I found the answer while posting this, so in the spirit of sharing I'll include my solution.

15 Oct
2 years ago

ShaneTurner left a reply on Elixir Won't Run In Laravel 5.3.18

What version of node are you running node -v

ShaneTurner left a reply on Laravel 5.3 Single Sign On?

If you're referring to signing on with the likes of your Google / Facebook / Github account then you'll want to look into [Socialite] (https://github.com/laravel/socialite), there's also a lesson covering how to do this with Socialite and Github.

ShaneTurner left a reply on Can't Deploy

the default .gitignore file lists the .env as one of the files to ignore and not deploy. You need to re-create this file on your server.

13 Oct
2 years ago

ShaneTurner left a reply on Hi Jeff, How To Subscribe And Pay Montly/yearly Without Credit Card

You could ask your bank, if you have the Mastercard Logo, it likely you can use if for purchases. Ask at your local branch.

12 Oct
2 years ago

ShaneTurner left a reply on Multiple Apps On One Domain

Thanks @jimmck that could be helpful for future projects. But not quite what I was looking for in this case. I should have found a more appropriate word, as in hindsight module does have it's own meaning.

I'm wanting to use two complete laravel applications on the same domain, with one of them running off the /admin subdirectory.

11 Oct
2 years ago

ShaneTurner started a new conversation Multiple Apps On One Domain

I'm working on a project that has become very modular, and have contemplated splitting into an individual user facing application and separate admin/backend application.

In short I want all standard routes to point to the user app except for /admin/* which I want to use the admin app. This will be running off the same domain.

example.com/* -> user app example.com/admin/* -> admin app

I've tried to get this working but can't figure out where the problem is. I'm guessing the nginx config.

server_name example.com;

root /var/www/userapp/public;

index index.html index.htm index.php;

location /admin {
    alias /var/www/adminapp/admin;
    try_files $uri $uri/ /index.php?$query_string;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;
}
.
.
.

28 Sep
2 years ago

ShaneTurner left a reply on What Is The Best Package For Paypal Payment To Use?

Maybe Cashier's Braintree flavour can be of assistance. Isn't Braintree now Paypal?

26 Aug
2 years ago

ShaneTurner left a reply on Gulp Not Working

Are you running gulp locally or globaly?

04 Jul
2 years ago

ShaneTurner left a reply on Cats Everywhere

... only missing some animated GIFs and booming midi files.

03 Jul
2 years ago

ShaneTurner left a reply on How To Work With Ajax In Laravel?

The Laracasts videos on VueJS show a lot in regard to AJAX requests. In fact, most of the Javascript videos touch on it in some way.

30 Jun
2 years ago

ShaneTurner left a reply on Laravel Speed

I've had the odd 'rotten' droplet with DO. High latency and slow load times. First time this happened it took about a week of back a forth support with digital ocean support team trying to find the root of the problem. Optimized, cached, checked network etc. In the end, on a hunch, I just copied the server image to a new droplet and the problem vanished.

Just an FYI in case all else fails.

27 Jun
2 years ago

ShaneTurner left a reply on Why Are Laravel Timestamps Saved Using Current Timezone?

If the location of your server is irrelevant to the app, then I'd go with UTC/GMT. If on the other hand, the local date is important then use the local timezone. Eg: Another application accesses the DB directly then there's a case for local data.

Also consider that some company policy, industry guidelines, or National legislation may require raw data to be in a particular format. Especially if it is to be audited.

22 Jun
2 years ago
11 Jun
2 years ago

ShaneTurner left a reply on Congratulations Jeffrey!

Awesome!

Will forgive all future sleep deprived ramblings and baby-keyboard malfunctions.

03 Jun
2 years ago

ShaneTurner left a reply on Is Composer Self-update Is Important ?

Think of Forge as a control panel for your server. If you're confident in your Linux command line abilities, and have the time, then you can manage your server without Forge. On the other hand, if you're used to cPanel and the like, then Forge it probably a good options.

31 May
2 years ago

ShaneTurner left a reply on Message: Re-evaluating Native Module Sources Is Not Supported

Ok, after a bit of research I can confirm it's a known issue with Gulp 3.x and will only be resolved with the release of Gulp 4.0, where the dependency will be entirely removed. Or so it's said over at Gulp's GitHub issues page.

30 May
2 years ago

ShaneTurner left a reply on Message: Re-evaluating Native Module Sources Is Not Supported

├─┬ [email protected] │ └─┬ [email protected] │ ├─┬ [email protected] │ │ └─┬ [email protected] │ │ └─┬ [email protected] │ │ └─┬ [email protected] │ │ └── [email protected] │ └── [email protected] └─┬ [email protected] └─┬ [email protected] └── [email protected]

So I guess it's Mr Glob.

ShaneTurner started a new conversation Message: Re-evaluating Native Module Sources Is Not Supported

Receiving the following message when running gulp. fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. Gulp and gulp watch seem to run fine regardless. Just curious what this is about.

Running node v6.2.0, npm v3.8.9, on Ubuntu 16.04 if that's any help.

25 Apr
2 years ago

ShaneTurner left a reply on How Long Will Laracast Provide Useless Transfer Rates?

I guess they're being cheap. Change ISP?

11 Apr
3 years ago
05 Apr
3 years ago

ShaneTurner left a reply on Laravel Timestamps

But you stated the time difference was only 9 minutes. It it was a timezone issue it would be out of sysc by whole hours. That's why I suggest you check you system clock. Is the VM's clock in sysc?

ShaneTurner left a reply on Laravel Timestamps

Check your server timezone settings and your application setting match. Then check if the server clock is right.

sudo hwclock --show
10 Mar
3 years ago

ShaneTurner left a reply on What Are The Best Specs For Laravel Development?

You don't need too much power when developing, so I'd go with what makes most 'ergonomic' sense for you. Go with the machine that has the most comfortable keyboard , and the easiest to read screen. You'll be working on it all day, every day. If the cheapest machine has the best feel for you then go for that. If the latest macbook does the trick, then get that. BUT TRY IT IN PERSON .... before you buy.

30 Jan
3 years ago

ShaneTurner left a reply on Advice About Security Of System That Holding Cc Number/money Value

Jeffrey has produced a series called 'Billing With Stripe.' Have a look at that, even is Stripe isn't available in your area you can learn a lot.

18 Jan
3 years ago

ShaneTurner left a reply on VIM Series

Looking forward to this.

And some good points from @Nick385

15 Oct
3 years ago

ShaneTurner started a new conversation NGINX: Routes Ending In .php

This is likely an Nginx config issue, but so far I haven't found a solution.

I have a standard 404 page for non existent file requests, and this works file. Except for files ending .php, the server just returns a default "File not found." It's clearly not being processed by Laravel.

Anyone know the correct config to get this working?

Current config:

server {
    listen 443 ssl;
    server_name website.dev www.website.dev;
    root /home/development/code/sites/website.dev/public;

    index index.html index.htm index.php;

    charset utf-8;

    ssl_certificate /home/development/.ssl/nginx.crt;
    ssl_certificate_key /home/development/.ssl/nginx.key;


    rewrite ^/(.*)/$ /$1 permanent;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log /home/development/code/log/website.dev.error.log error;

    sendfile off;

    client_max_body_size 100m;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }
}
25 Aug
3 years ago

ShaneTurner left a reply on Doesn't Fit Design

I've never been a fan of those pop out navigation things, but it seems to fit with he rest of the site.

I must note, that the new darker red is a bit harder to read against the black backgrounds.. But other than that, it functions well.

06 Aug
3 years ago

ShaneTurner left a reply on App Deployment

Justin Ellingwood at DigitalOcean wrote a good tutorial on basic server setup:

https://www.digitalocean.com/community/tutorials/how-to-install-laravel-with-an-nginx-web-server-on-ubuntu-14-04