ian_h

ian_h

Senior PHP / Web Developer at giffgaff & ICA Web Design

London, UK

Member Since 3 Years Ago

Experience Points 15,685
Experience
Level
Lessons Completed 54
Lessons
Completed
Best Reply Awards 9
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.

25 May
2 years ago

ian_h left a reply on Blade Strips Spaces Inside Variable

Hi..

This would resolve it:

{{ str_replace(' ', ' ', $invoice->a46 }}

Cheers..

Ian

ian_h left a reply on Where To Start With Building Testable Applications?

TDD... IMO is the best way to go forward with this... before even creating your Model or Controller file etc, write a failing test for the logic of what you want it to do, for example:

/** @test */
public function show_should_return_a_200_status_code()
    $this->visit('/')
        ->seeStatusCode(200);
}

This would fail on the fact that you're yet to create your controller / method etc.. so now create that and return a basic view.. test should then pass.

Then add some more logic to the test method of what's expected to happen so that it fails again... then write your controller / model codes to do what you expect to satisfy the test until it passes... lather, rinse, repeat.

I've only recently started down this path myself too in comparison to my total coding years. Initially I struggled with the concept (how can I test for something I haven't even written yet!?) but then I got into the mind set that I'm not looking to test things line by line as I code them per-se, but more the logic / thought behind what I want to happen from it.

Although based on Lumen 5.1 (I didn't have to make many changes for 5.2).. I found https://leanpub.com/lumen-apis Writing APIs with Lumen by Paul Redmond a good book to work through (haven't yet completed it due to time / project constraints yet but what I have was a great insight IMO).

Cheers..

Ian

ian_h left a reply on How To Globally Set UK Date Format In Carbon To Auto Update For BST

I have Europe/London set in my config for my timezone and this seems to be picking up the correct time with no fancy calculations required.

But store all dates as unix timestamps in the database IMO.. it'll save you a whole heap of issues in the future (my worst nightmare was developing a site for Safelite Autoglass a few years ago... UK-based server, US-based company who insisted all dates / times were saved in the datebase in a DateTime field with an EST timezone... argh!!).

Cheers..

Ian

ian_h left a reply on Best Laptop For Web Developer?

I have a Macbook Pro from work.. and I use it because I "have to". Personally, I don't see what all the fuss is about personally.. in fact, it's a PITA with it's stupid keyboard layout (I am running a British PC map to help). Whilst the terminal is nice.. you can get exactly the same with a *nix setup (Linux Mint would be a great alternative to windows IMO). I use one of my Razer Mamba mouse plugged into the Macbook.. but even then, not all the buttons work as you'd expect. Likewise, I have to suffer with the Mac keyboard as my preference (Cherry G80) doesn't work properly with it (keys are all over the place and the custom keymap designer things I did come across were useless at best).. oh, and it weighs a ton!

My personal "laptop" is a 512GB i7 Surface Pro 3 running Win 8.1 Enterprise. As long as you don't need to mount NFS shares (even with Enterprise this doesn't seem to work too well for me).. I've not found an issue for web dev (especially now that Node / NPM have sorted themselves out with a more flat directory hierarchy for dependencies).. it does everything I want.

I also have a Linux Mint laptop (my old i5 that I decided to test it on) that works nicely too (and recognises and plays ball with all my preferred peripherals).

As has already been mentioned.. a lot of it will be down to your preference / familiarity with things.. personally I'm quite at home with a windows GUI and a *nix console.. I don't really care for "shiny" so for me it's down to compatibility with other things (such as the peripheral issues etc).

There's really no right nor wrong answer.. just personal preference :)

Cheers..

Ian

ian_h left a reply on Snippets For Blade

I do the same, I have a structure for a current project such as:

[ ]views
    [ ]partials
        [ ]modals
            -bootstrap-modal-foo.blade.php
        -navigation.blade.php
        -footer.blade.php
-contact.blade.php
-about-us.blade.php

I find it much easier to compartmentalise things in this way personally :)

Cheers..

Ian

15 Mar
2 years ago

ian_h left a reply on How Do I Setup 2 Homestead Boxes? ( One With Php 5.6 And One With Php 7)

Have a look at PuPHPet you can define a VM really simply there, just create 2 (setup once and then just change the PHP version and download the archive again) and Bob's ya Uncle. If you set 2 different IP addresses (instead of just changing the PHP version), you should also then be able to have both VMs running side by side without a problem.

Normally I run one VM for multiple sites as it's simpler than having lots of separate vagrant / vm setups, but if I need something specific (ie: closer to a different production environment) then I'll just create another config specific for that project / set of projects.

Whilst Homestead worked for me.. I found this to offer far more flexibility (and for me, the option to use VMware over VirtualBox for better performance / reliability too, albeit not free).

Cheers..

Ian

14 Feb
2 years ago

ian_h left a reply on Homestead & MariaDB

@Reached Homestead will be running on a different IP address (can't remember the default now as I replaced its use with a custom Vagrant+VMware setup). The IP address should be in your homestead.yaml file.

You may also need to update the server bind address (not used MariaDB, but assuming it uses the same).. you'll need to update the my.cnf file within the homestead VM (possibly /etc/mysql/my.conf) as it maybe have a line in there saying 'bind-address=127.0.0.1'. If so, you'll either need to edit that to read 'bind-address=0.0.0.0' or add SSH tunnelling in sequelpro (no idea how to do that, sorry, I use navicat as a DB client).

Hope this at least half helps =)

Cheers..

Ian

ian_h left a reply on Joining 2 Tables

OK.. solved =)

ForumUser model

public function fields()
{
    $users = $this->hasOne(ForumUserField::class, 'userid', 'userid');

    return $users;
}

ForumUserField model

public function forumUser()
{
    return $this->belongsTo(ForumUser::class, 'userid', 'userid');
}

ForumUserController (example test)

public function index()
{
    $members = ForumUser::where('groupid', '=', 2)->first();

    $foo = $members->fields->field3;
    $bar = $members->username;
}

In relation to the SQL query.. $foo == 'table2.field3' $bar == 'table1.username'

Cheers..

Ian

ian_h started a new conversation Joining 2 Tables

Seems a silly question, but can't for the life of me get this working =(

The following SQL query works and is what I'm trying to replicate nicely with hasOne / belongsTo (assuming these are correct)?

$users = \DB::table('table1')
            ->join('customfields', 'table1.userid', '=', 'table2.userid')
            ->where('table1.groupid', '=', 2)
            ->get();

        return $users;

There's only ever a single row for 'userid' in both table1 and table2 (hence I thought hasOne()), but alas, I'm stumped!

Any help greatly appreciated! =)

Cheers..

Ian

19 Jan
2 years ago

ian_h started a new conversation Posting Replies When Multiple Browser Tabs Are Open

Hi @JeffreyWay

If I open multiple tabs with Laracasts forum content, when replying let's say to the discussion in "tab 1", then instead of being redirected to that thread, I'm sent back to the forum root.

This happened with the old forum before the revamp too... a bit frustrating =)

Hopefully you can look into and resolve this issue =)

Cheers..

Ian

ian_h left a reply on NPM Install Error

Ahh NPM on windows and path lengths.

Try this:

npm install dedupe shrinkwrap -g

Then in your project root, run: npm dedupe npm shrinkwrap

This basically flattens the stupid nested node_modules dependencies for all of the modules, removes duplicates and makes working with NPM much easier on windows. I found this solution after hitting a similar issue with path lengths.

Cheers..

Ian

17 Jan
2 years ago

ian_h left a reply on A Quick RegExp Help Please

Also have a look at The Regex Coach ( http://weitz.de/regex-coach/ ). It's a great tool for working out regex strings :)

Cheers..

Ian

ian_h left a reply on Back To Homestead With PHP 5.6

I stopped using Homestead as I wanted more flexibility (I use VMware rather than VirtualBox for example). Give https://puphpet.com/ a try.. you can customise your box to whatever you want... you can easily run multiple VMs (so PHP5.6 and PHP7 depending on your needs).. and everything is defined in the config.yaml file (which you can drag-drop back into the site to make any tweaks in the future... easy for adding new databases or virtual hosts if you don't want to edit the file manually).

It's a great project IMO :)

Cheers..

Ian

02 Oct
3 years ago

ian_h left a reply on Best Domain Registrar (Best Place To Buy Domain)

I've used https://www.name.com/ for just over 10 years for .com and .net domains (used to be domainsite.com). I think .com / .net etc are something like $10.99

Their support team are great (contacted a few times in the early days when I needed to register my own DNS servers (I think this can actually be done on their site these days if required)) and have never had a problem with the service in general.

My DNS servers (primary and secondary) are stored as the "defaults" so any new domain I purchase will assume my servers instead of their own. Doesn't really get much easier IMO =)

Cheers..

Ian

20 Sep
3 years ago

ian_h left a reply on Which OS Are Most Laravel Developers Using?

Windows 8.1 for me running Homestead (sometimes puPHPet depending on circumstances / requirements).

At work, Macbook Pro running vagrant / vbox.

Preference? Windows for desktop, Unix for servers. The Mac does nothing for me really (only frustrate me that some of the keys are in stupid positions (yes I have the PC keymap installed but doesn't change the symbols on the keys itself)).

@spoon I have a 24" and 27" Ultrasharp Dell that does portrait / landscape.. although never used either of them in portrait orientation. The screens themselves though are really good IMO.

I also have a 3 mechanical keyboards.. love the things. Mine are all Cherry G80s.. definitely worth the price.

Cheers..

Ian

19 Sep
3 years ago

ian_h left a reply on Testing Delete Links

@hromby I created an app that has links that I add / edit / delete (soft and hard delete).. my hard delete (remove from DB) test looks like:

    public function testUserCanHardDeleteLink()
    {
        // Mock user and server vars
        $this->mockUser();
        $this->mockServerVars();
        $linkDescription = $this->createLinkDescription();
        // Create a test short link
        $link = $this->createTestShortLink($linkDescription);

        // Check for new link
        $this->visit('/links')
            ->see($linkDescription)
            ->seeInDatabase('links',[
                'user_id'               => 0,
                'description'           => $linkDescription,
                'deleted'               => 0,
            ]);

        // Soft delete record
        \Auth::user()->links()
            ->where('id', '=', $link->id)
            ->update(['deleted' => 1]);

        // Delete link from the database
        $this->post('/links/bin/delete', [
            '_token'            => csrf_token(),
            'linkId'            => $link->id,
        ]);

        // Check we get a JSON response back and that 'deleted == true' and the link ID is returned
        $this->seeJsonEquals([
            'deleted'               => true,
            'linkId'                => $link->id,
        ]);

        // Check that we don't see the link in the database
        $this->notSeeInDatabase('links', [
            'user_id'               => 0,
            'id'                    => $link->id,
        ]);
    }

Maybe this will help a bit?

Cheers..

Ian

14 Aug
3 years ago

ian_h left a reply on 5.1 Phpunit Tests Fail Without Middleware

You can still use users for tests and not worry about disabling middleware (not that that worked for me anyway). Here's a basic example I used for one site that required authentication to view a lot of the pages:

public function testUserCanSeeLinksTable()
{
    // Mock user authentication
    $this->mockUser();

    // Check the '/links' route and check for the tbl-links table ID
    $this->visit('/links')
        ->seeStatusCode(200)
        ->see('id="tbl-links"');
}


protected function mockUser()
{
    $userSettings = \Clk\User::getDefaultSettings();
    $userSettings['check_status_code'] = false;

    $user = new Clk\User(
        [
            'name'          => 'Tester',
            'email'         => 'tester@email.com',
            'is_admin'      => false,
            'settings'      => $userSettings,
        ]
    );
    $user->setAttribute('id', 0);
    $this->be($user);
}

Cheers..

Ian

ian_h left a reply on Help Me Purchase A Domain Name.

@Mithridates with a VPS, you'll normally get a control panel too (cPanel, Plesk, etc) where you'll be able to do all of the above visually, which'll help massively the first time around =)

Cheers..

Ian

13 Aug
3 years ago

ian_h left a reply on Laracon 2015 Videos

That's a real shame, I was looking forward to watching these. Unfortunately it wasn't the entry ticket price that prevented me from attending, it was the air fare as well, and the fact I've just come out of hospital from a major op.

Seems a strange choice not to record it. Even though I've attended PHPConferenceUK a couple of times, it was also nice to be able to view the recordings on youtube too as it means you can "re-listen" in case you missed anything and with a multi-track conference, means that you can actually be in 2 places at the same time, kinda! =)

Cheers..

Ian

ian_h left a reply on Help Me Purchase A Domain Name.

@Mithridates The normal procedure is:

  • Register domain name
  • Buy web hosting
  • Change registered domain name nameservers to the ones provided by your hosting provider
  • Hosting provider would normally provide email accounts (accessible via your domain name, you@yourdomain.com for example)
  • You can then add email forwarders to your main email account if you so wish (I personally have about 4 actual accounts, but probably 100 or so forwarders for various things).
  • Upload / deploy your site to your web host
  • Your website would then be accessible via your domain name (www.)yourdomain.com

These are the very basics in getting a domain and a site married together for public access.

Cheers..

Ian

12 Aug
3 years ago

ian_h left a reply on Error On Installing Homestead

@kyawzinwin You've got a typo. It's LARAVEL not LARAVLE as your error message says. Correct this and you should be good to go.

Cheers..

Ian

09 Aug
3 years ago

ian_h left a reply on PHPStorm Create New File With Directory

On windows, you can use Shift+Alt+Num7. This should highlight the "breadcrumbs" where you can easily back up to the root of the project (or your chosen subdir if easy enough) before hitting alt+insert to create a new file =)

Cheers..

Ian

07 Aug
3 years ago

ian_h left a reply on Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

Distro would have referred to a Linux distribution (Debian, Ubuntu, CentOS, etc etc).

I'm not a mac user personally, but have just found this Installing the PHP mcrypt extension on OSX 10.9 blog post that should help?.

If not, then I'm sure one of the many mac experts on here will be along at some point to assist you further =)

Cheers..

Ian

ian_h left a reply on Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

@mattysmart what OS / distro are you running your app on?

Cheers..

Ian

ian_h left a reply on Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

@mattysmart You'll need to install the mcrypt PHP extension. This is an OS-level extension, not application, so you'll need root / sudo access.

For Debian, I'd simply do:

# apt-get update
# apt-get install php5-mcrypt

then add the mcrypt.so module to my php.ini file if it hadn't done it automagically.

Cheers..

Ian

ian_h left a reply on What Font Is Jeffrey Using In Sublime Text?

If you want Menlo for non-mac, Meslo is the one.

As for Jeff's font, with the open @ char, it looks like Fira Mono or Fira Code (basically Fira Mono with ligatures).

The other font I think that has been used in the past is possibly Input

Anonymous Pro is quite nice, I also quite like (Envy Code R)[http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released]

Cheers..

Ian

06 Aug
3 years ago

ian_h left a reply on GitHub Or BitBucket

@himenjil Fair play. I'm a "sole dev" for most of the time for freelance projects, so the "10 user starter license" for £12 per year (with taxes) works a treat for me, but I'm aware of the large hike in price for anything >10 users (although in my position, I really like Atlassian's pricing model).

For my previous employer, it was all through BitBucket as it was private corporate repos (I think with the number of contributors with it all and the private requirement, it was more cost-effective than Github.. I know both were considered).. never had a problem with that (I use Atlassian's SourceTree as a windows GUI for my general git interactions).

I do think for open-source / public repos, GitHub probably has the "social edge" over BitBucket too... which is likely to make your project (if looking for public contributions) more attractive.

Cheers..

Ian

ian_h left a reply on GitHub Or BitBucket

Atlassian Stash for me personally :)

Cheers..

Ian

05 Aug
3 years ago

ian_h left a reply on Laravel Homestead - Accessing Remotely

@zuk1 Yup, that should work .

I know Homestead uses nginx over Apache, but I think Apache's vHost definitions are simpler to read, so here's an example of the important directives that make it tick:

<VirtualHost 192.168.220.147:80>
  ServerName nameofmy.app
  DocumentRoot /path/to/nameofmy.app
</VirtualHost>

<VirtualHost 192.168.220.147:80>
  ServerName stockcontrol.app
  DocumentRoot /path/to/stockcontrol.app
</VirtualHost>

Your assumption is correct, the server reads the 'host' header sent by the browser (domain name in the URL), checks through the virtual hosts (even though there's more than one for that IP address), finds what it needs and serves the content from the defined DocumentRoot for that virtualhost.

The IP address really is only useful for making sure the data is sent to the right server, not what content may or may not be on that server.

Hope this just explains a little more in depth as to how it works along with the why it works that you assumed correctly =)

Cheers..

Ian

04 Aug
3 years ago

ian_h left a reply on Laravel Homestead - Accessing Remotely

@zuk1 this is all to do with "virtual hosts".

The IP address will always resolve to the default vhost (adminer by the looks of it).. the server requires a FQDN to actually do the resolution to the site needed... so you have 2 choices IMO:

1: Either set up an internal DNS server where you can yourself add the domain 'stockcontrol.app' and point it to your vagrant IP address (this may be overkill for you however).

2: Edit the hosts file (like you have for your dev box) on any other boxes you wish to access the vagrant box with.

Cheers..

Ian

ian_h left a reply on Laravel 5.1 On Shared Hosting Not Working

Glad all sorted @lrobi2015 =)

Apologies I dropped off the grid, just got home yesterday from being in hospital since last Saturday having my appendix out =)

Cheers..

Ian

28 Jul
3 years ago

ian_h left a reply on Laravel 5.1 On Shared Hosting Not Working

@Irobi2015 There's nothing "special" about the public_html dir as such.. as long as you don't have existing sites already running from there, deleting it would be no problem at all.. if the worst came to the worst, you could just recreate it =)

@rosswilson252 is also correct in that cPanel-based servers can be funny about permissions. Files need to be owned by the account owner (so if your account name is 'irobi' for example, then the files need to be owned by 'irobi' for user and group, and permissions can't be too global either, I think the most you'd get away with for files would be 0664 and dirs 0775.

I'm assuming you have SSH access to the server? if so, uploading the files should automatically assume the correct user / group as defined either by SCP / FTPS or FTP etc, whatever you use. If you need to change permissions, a quick and simple way to do this would be to put all of your uploaded Laravel files in a separate directory (as I mentioned, I use laravel but it could be anything for this step)... then do the following:

$ cd laravel (or whatever your dir is called with your laravel site in)
$ find . -type f -exec chmod 0644 {} \;
$ find . -type d -exec chmod 0755 {} \;

What this will do, is search the directory and set 0644 permissions on all of the files and 0755 on all of the directories. If it is / was a permissions problem, this would resolve it.

Now you can either move the contents of the laravel public dir into public_html or delete public_html and symlink it to your public dir or if moving to your public_html dir, move everything else back up into your home root (mv * ..).

HTH and clarifies a bit further =)

Cheers..

Ian

27 Jul
3 years ago

ian_h left a reply on Laravel 5.1 On Shared Hosting Not Working

On my VPS, I create a laravel dir and upload all of the files to that (either by SCP / FTPS or GitFTP).

I then delete the public_html dir and add a symlink to public in the laravel dir:

ln -s laravel/public public_html

and job done =)

Cheers..

Ian

ian_h left a reply on So Confused With Homestead

Install Homestead globally:

composer global require "laravel/homestead=~2.0"

You should then be able to access the 'homestead' command from anywhere.

Cheers..

Ian

25 Jul
3 years ago

ian_h left a reply on Installing Bootstrap - Npm (Node.js)/node_modules Vs. Bower/vendor Methodology

Personally, despite the recent(?) "don't use bower" brigade, I still use bower for a few front-end libs (jQuery, Bootstrap, Modernizr, etc). Until it stops working for me, I'll continue to use it as it's nice and easy.

You can use either npm or bower, it's mainly down to preference / what works in your scenario, neither are right nor wrong IMO.

Personally I've ditched Elixir for plain ol' Gulp. I found it more flexible and easier (due to less simplicity) to work with.

HTH =)

Cheers..

Ian

23 Jul
3 years ago

ian_h left a reply on Homestead Issue For Windows-8

@Tahsan you'll need to launch your editor (whatever editor you choose) as admin (right-click -> Run as Adminstrator) else you won't be able to save the changes.

The path is:

C:\Windows\System32\drivers\etc\hosts

Cheers..

Ian

22 Jul
3 years ago

ian_h left a reply on Why Does PHPStorm 9 Not Offer L5 Blade Files ?

It's not you @vincej , there simply is no option. I created a new template for blade files (as I have others for convenience).. you get to have more control over your own templates too =)

Cheers..

Ian

21 Jul
3 years ago

ian_h left a reply on Developing Laravel Apps On: Windows Vs Linux

@bashy Beena while since I used *nix as my desktop, but the last time I did,. it was FreeBSD 4.x and WMaker.. probably the equivalent of Win3.1 stylistically =D

As for development (just to stay on topic).. I replaced the above and went back to windows. I needed the likes the Photoshop, Illustrator (Gimp and Sodipodi just didn't cut it unfortunately, although Sodipodi was quite nice) so the other requirements op my development stack pushed me away from continuing down the *nix path as a permanent desktop environment (editor of choice back then was either Vim or Anjuta if I wanted a full-blown GUI editor).

I think it really depends on all of your requirements and what you're happy to use application-wise too (much of which has come an awful long way since my *nix desktop days however).

Cheers..

Ian

ian_h left a reply on Array To Object

Oops.. @pmall is correct.. '.' notation is twig not blade.. apologies.

Cheers..

Ian

ian_h left a reply on Array To Object

@sger try $item.id if it's an array.

$item->id wouldn't work even in PHP if $item is an array.. so blade won't either.

Cheers..

Ian

ian_h left a reply on No Email Notification Of New Lessons

Thanks @bashy.. at least it's not just me then =)

Cheers..

Ian

ian_h left a reply on Array To Object

@sger I'm sure blade handles arrays... you can use the '.' notation.

For example:

@foreach ($users as $user)
  <li>{{ $user.id }}<?li>
@endforeach

The exception you're getting is because you're trying to access a method to an object but the object is an array, not that blade can't handle arrays?

Cheers..

Ian

ian_h started a new conversation No Email Notification Of New Lessons

I've got the 'email me when new lessons are posted' setting enabled in my settings, but alas, the entire Git series thus far has resulted in no email notifications at all.

I know that my laracasts->email is working as I get @ mention notifications come through no problem.

An issue for just me? or anyone else too?

Cheers..

Ian

20 Jul
3 years ago

ian_h left a reply on PHP Books

@steveperrycreative I'd say for testing, https://leanpub.com/b/grumpy

I've also got a (previous edition) copy of http://www.apress.com/9781430260318 that I remember looking through a few years back for patterns and objects etc.

None are specific to Laravel.. but all are good to have IMO.

No doubt there will be other suggestions too =)

Cheers..

Ian

18 Jul
3 years ago

ian_h left a reply on Composer Using Wrong Php Version

@Mattiman The cmdline and webserver are obviously configured to use different versions.

You could try changing / adding your AMMPS PHP path to your PATH env.

AMMPS has obviously set up it's own path vars as a "self-container setup" so to speak, but running composer on the cmdline will use your actual system version unless you change your PATH for PHP.

Cheers..

Ian

ian_h left a reply on Composer Using Wrong Php Version

@Mattiman What do you get when you run 'php -v' from the cmdline?

Cheers..

Ian

17 Jul
3 years ago

ian_h left a reply on '%' In Search Term Rather Than +

Wouldn't the '%' get escaped in the query string?

'+' indicates a space usually with certain URI encoding, but '%' on its own doesn't, a space using a '%' value would be '%20'.

I haven't checked, but I would have some reservations about future reliability using a '%' char in a query string for anything other than proper URI encoding.

Cheers..

Ian

16 Jul
3 years ago

ian_h left a reply on Stripe Cards Getting Declined

I had an issue subscribing here with a debit card issued from Barclays Bank here in the UK.

My HSBC debit card however went through without an issue.

Cheers..

Ian

14 Jul
3 years ago

ian_h left a reply on Gulp! "concatenate" Multiple Read Streams Into Single One?

@sahibalejandro Add gulp-concat to your npm stack.. then simply add it to your .pipe sequence. For example:

var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');

gulp.task('js', function() {
    return gulp.src(['resources/assets/typescript/js/file1.js', 'resources/assets/typescript/js/file2.js'])
        .pipe(concat('concatted.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('public/js'));
});

This will concat both file1.js and file2.js and also run it through uglifyjs (remove the uglify() call and gulp-uglify if you're not interested in minifying too).

Cheers..

Ian

13 Jul
3 years ago

ian_h left a reply on Laravel And PHPStorm

@ngocphamm FWIW, it's not just Laravel. I've only been using Laravel for a couple of weeks, previously mainly Zend Framework 1 / 2, and it was the exact same for the Zend Frameworks too.. my ZF code's riddled with things like:

/** @var \Some\Namespaced\Class $foo */
$foo = $this->getServiceLocator()->get('Some\Namespaced\Class');

just to make it easier not to have to remember every method of every class =)

Cheers..

Ian