MarkTierney

MarkTierney

Member Since 3 Years Ago

Blackpool

Web Developer at Interactive Dimension

Experience Points 16,550
Experience Level 4

3,450 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 161
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.

14 May
6 days ago

MarkTierney started a new conversation Automatically Restart Mysql After Valet Restart?

I'm finding that every time I change php version in valet I need to restart mysql otherwise it doesn't work properly.

Is there a native way to achieve this? Or do I need to write my own script?

Thanks!

15 May
1 year ago

MarkTierney left a reply on Advice Needed: Save And Continue On A Form.

Thanks, yes this makes sense.

The thing I'm worried about is I'm essentially saving invalid data, which could potentially be a security risk.

MarkTierney started a new conversation Advice Needed: Save And Continue On A Form.

I have a multi-page form with hundreds of inputs. The validation of the data is crucial once the form is complete, but I also need a 'Save and continue' feature if the user doesn't have all the information to hand.

Obviously I can't save invalid data (missing fields etc), so what would be the best approach to take?

I suppose I could dump all the form values into a json object and save it in a different table maybe? And only validate the data on 'save' (not 'save and continue').

Thanks in advance :)

05 Mar
1 year ago

MarkTierney left a reply on Using A Trait In All Controllers

This works using self::success() instead of Alert::success() -

return redirect(route('customer.index'))->with(self::success('Success message here!'));

Must be bad practice to use static methods on a trait from a parent class maybe?

MarkTierney left a reply on Using A Trait In All Controllers

This is what my base Controller class looks like.

MarkTierney left a reply on Using A Trait In All Controllers

Inside say the update method:

return view('customer.index')->with(Alert::success('Success message here!'));

Is it because I'm calling static methods on the trait?

MarkTierney started a new conversation Using A Trait In All Controllers

Hi

I wanted to use an Alert trait on all my controllers so I imported it to the main Controller class (app/Http/Controllers/Controller.php). However none of my controllers could find the trait.

Any idea why?

01 Dec
1 year ago

MarkTierney left a reply on Multi PHP Versions On Server. Possible To Make Artisan Run From Public Directory?

Awesome, thank you! Seems obvious now you say it, doh!

MarkTierney started a new conversation Multi PHP Versions On Server. Possible To Make Artisan Run From Public Directory?

Hi

I've got multiple Laravel sites on a VPS (Centos 6). I have some running Laravel 4.2, some on 5.2 and some on 5.5.

I'm running EasyApache 4 on the server which allows me to have different versions of php for each domain which is great, the laravel sites all run fine but artisan commands have stopped working on the older versions of Laravel.

Any artisan commands give me the following:

[Symfony\Component\Debug\Exception\FatalThrowableError] Call to undefined function mysql_connect()

If I do 'php -v' in the Laravel directory it always say php7.1 is running but if I go into the public directory it will give me the correct version for each domain.

So I'm wondering if there's a way I can make artisan run from the public directory so it sees the correct php version for the application.

21 Jan
3 years ago

MarkTierney left a reply on Can't Echo Php String Because It's Too Long?

It turns out to be some kind of buffering issue. The php page is filling up the buffer and never getting a response.

I found a workaround, calculating the header content size and adding it to the headers allows the page to load.

Here is the middleware I found that could do this for anyone else encountering this weird issue: https://laracasts.com/discuss/channels/general-discussion/add-content-length-header-on-views?page=1

MarkTierney left a reply on Add Content-Length Header On Views

This just helped me out loads, thanks!

20 Jan
3 years ago

MarkTierney left a reply on Can't Echo Php String Because It's Too Long?

Yeah but it loads fine in the same browsers on my local machine. Oddness indeed!

MarkTierney left a reply on Can't Echo Php String Because It's Too Long?

What is bizarre is that the script loads fine if I view it on the same network on an iphone!

MarkTierney left a reply on Can't Echo Php String Because It's Too Long?

Haha, i'm outputting a virtual file tree with lots of files with long names!

The problem boils down to the length of the string (lots of nested unordered lists) I'm trying to output.

I've checked my error_logs and there's nothing there. I've gone through all my php ini settings and set them to at least what my local machine is set to. Plus if the string is 2 million characters long it executes in under a second so I'm sure it's not a time thing.

Thanks for your answer though!

MarkTierney started a new conversation Can't Echo Php String Because It's Too Long?

Hi I've tried asking this on stackoverflow to no avail so I thought I'd try here.

I have a problem on my live server where the script below won't run and just causes the page to hang. If I reduce the number of loops to 2,000,000 it works. So i'm guessing there's some config I need to change. However I've upped everything I can think of to accommodate long running scripts, file uploads, max request size etc and nothing is working.

Any help or suggestions would be greatly appreciated!

$data = '';

for($i = 0; $i < 3000000; $i++) { $data .= 1; }

echo $data;