DevMaster

DevMaster

Member Since 6 Months Ago

Experience Points 3,880
Experience Level 1

1,120 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 23
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.

15 May
2 months ago

DevMaster started a new conversation Good Places To Advertise Laravel Job Roles?

Hello Laracastaways,

A request for knowledge really:

I note that Laracasts itself doesn't have a jobs board. So I was wondering what some good places would be to advertise available Laravel job roles?

Best regards, Dev Master

06 Apr
3 months ago

DevMaster left a reply on Question About Nova Licences

Thanks @nathanheffley. Yeah, Taylor seems pretty open minded about it.

30 Mar
3 months ago

DevMaster left a reply on How To Set Folder Permissions For Public Users' Folder?

Creating the symlink should be a one-time thing

DevMaster left a reply on Webscraping Help With Goutte.

I think you might be looking for something like this (which is plain commandline PHP):

<?php

include './vendor/autoload.php';

use Goutte\Client as Client;

$client = new Client();

$response = $client->request('GET', 'http://ets.aeso.ca/ets_web/ip/Market/Reports/CSDReportServlet');

$response->filter('table')->each(function($node){

    $node->filter('th')->each(function($node){
        echo 'Table: ' . $node->text() . PHP_EOL;
    });

    $node->filter('td:nth-child(2)')->each(function($node){
        echo $node->text() . PHP_EOL;
    });

});

25 Mar
3 months ago

DevMaster started a new conversation Question About Nova Licences

Well, I paid for Nova v1.* and the Nova docs say:

" Licenses are valid for an entire major release "series". In other words, a license entitles you to all updates until the next series release. The current series is Nova Orion (initially released Aug 2018) and includes Nova 1.0+.

Many minor updates are made throughout a series release and all of those updates are free to existing customers. "

BUT Nova 2.0.0 (a stabilising version for Laravel 5.8 support) is still in the "Orion" series. So, in terms of licenced support, will the version numbers be the thing that restricts my support? Or will it be the "Orion" series name?

IfyouknowwhatImean?

24 Mar
3 months ago

DevMaster left a reply on Sendmail Not Working With Auth().

Are you trying to send an email to Auth::user()?

DevMaster left a reply on Form - Show Old Array Data And Existing Model Data

Interesting question, I've never had to think about old() for inputs where the name is some-array[].

Maybe you could put an index in the square brackets of highlights[], kind of like this idea on Stack Overflow: https://stackoverflow.com/questions/42050732/old-input-for-array

Actually, there is a Laracast video on old() and edit forms, on moment...

DevMaster left a reply on Did Laravel Change The Way Datetimes Types (`created_at`, `updated_at`, Etc) Are Formatted By Default In 5.8? I Can't Figure Out Where/how Datetimes Are Formatted In API Responses.

Not sure if this directly answers your questions, but two things about dates have changed in Laravel 5.8:

[] The version of Carbon used by the framework is 2.* (it was 1.* for Laravel up to 5.7)

[] The (optional) deleted_at "soft delete" column now auto casts (as the updated_at and created_at column always have)

DevMaster left a reply on How To Set Folder Permissions For Public Users' Folder?

Do you have SSH access to you webserver?

It sounds like a permissions problem with storage/app/public or possibly an issue with the symlink.

DevMaster left a reply on Webscraping Help With Goutte.

Hello @fbc , did you solve this problem in the end?

I've used Goutte a lot and would love to help; though I might need more details.

I suspect you'll need to get all TD elements in each row and simply access the 2nd TD element.

23 Mar
3 months ago

DevMaster left a reply on Wouldn't A Cache:list-items Artisan Command Be Useful?

Oops, or does Laravel Horizon already do this? That seems to be a Redis frontend...

DevMaster left a reply on Wouldn't A Cache:list-items Artisan Command Be Useful?

Thanks for the ideas link @cronix, I might have a go at writing a command like this myself!

22 Mar
3 months ago

DevMaster left a reply on Why Isn't The 'deleted_at' Datetime Field Auto-casted?

Yep, does indeed look like auto casting of the soft delete timestamp was added in for 5.8 https://laravel.com/docs/master/upgrade#model-names-ending-with-irregular-plurals (and then scroll down a bit)

DevMaster started a new conversation Wouldn't A Cache:list-items Artisan Command Be Useful?

Hello Laracasters,

Why doesn't Laravel bundle a cache:list-items Artisan command?

This command would dump out all key value pairs currently in the cache.

How about that?

Kind regards, Dev Master

16 Mar
4 months ago

DevMaster left a reply on Additional Scripts

Sorry, I don't have an answer to your question, but I'd love to hear how you've "multi-tenanted" Laravel in this way!

DevMaster left a reply on Laravel And Permissions On Centos

Is there a problem with using 777?

775 probably doesn't work because Laravel via the web will probably be an 'apache' UNIX user but Laravel via artisan CLI could be different.

DevMaster left a reply on How To Call A Controller With A Function On The Routes Page AND Forward Parameters?

Do controllers called in this way [App::call()] have to exist in the root App namespace? I couldn't get this to work when trying to laucnh a method on a controller in a /vendor package.

DevMaster started a new conversation Logging Generally And Changed From 5.6 To 5.7

Is it correct that the 5.7 default config for logging is:

'stack' => [
            'driver' => 'stack',
            'channels' => ['DAILY'],
        ]

But for 5.6 it was:

'stack' => [
            'driver' => 'stack',
            'channels' => ['SINGLE'],
        ]

???

Also, I've not had any issues with SINGLE as it simply creates a laravel.log file with full permissions (777) such that the web user and the artisan CLI user can both append to the log file.

But, DAILY seems to create per-day log files with 644 permission - so if the web user creates the log file first, the artisan CLI user cannot then append to the log file and vice versa.

Why is DAILY doing such different things with the log file, and how can I override this? Where / how can I set the permissions or even the date format in the filename? Daily log files are useful, but it doesn't seem to work out of the box.

Kind regards, Dev Master

DevMaster left a reply on When And How To Use Associate() Method?

@TYKUS - I think it might be a different, deeper issue than this but thanks @tykus, I'll take a look.

DevMaster left a reply on Return Of Model::create() Versus New Model()

@TYKUS - Totally makes sense, many thanks @ty

12 Mar
4 months ago

DevMaster started a new conversation When And How To Use Associate() Method?

Hello,

So Eloquent's attach() method is for many-to-many situations; and I am using that without issue.

The equivalent for 1-to-many relationships appears to be associate(), but I can not get this to work. (failing with either "undefined method" or it doesn't auto add the foreign key.) I am able to simply use $singleModel->manyRelatedModels->save(new RelatedModel()) instead.

But I'm curious and wondering if anybody can shed any light on the associate() method?

Best regards, Dev Master

DevMaster started a new conversation Return Of Model::create() Versus New Model()

Hello LaraV.I.P.s

Just wondering if the return types of Model::create() and new Model() are supposed to be the same? Or do they differ?

I ask because I would expect them to be the same, but I'm experiencing different behaviour when using one versus the other (especially in the save() and associate() Eloquent methods).

Best regards, Dev Master

01 Mar
4 months ago

DevMaster left a reply on Why Can't Set Custom Message With Abort()

Thanks for all the advice guys, much appreciated.

DevMaster left a reply on Why Can't Set Custom Message With Abort()

@TANGENTE - I can't find these Blades to be honest. Are they in /vendor or do they get published somewhere in my app's codebase?

28 Feb
4 months ago

DevMaster left a reply on Form Doesn't Get Values

I'm not familiar with the 'form' attribute for tags, so let me talk about some other things:

Your form s will need 'name' attributes to be able to submit the data bag to the controller.

DevMaster started a new conversation Why Can't Set Custom Message With Abort()

Hello everybody,

So I'm just wondering why, with out-of-the-box laravel 5.7, abort(403, 'My custom text') sets my custom text BUT if I do the same for 404 or 500 it doesn't set my custom text?

This is unusual.

Kind regards, Dev

DevMaster left a reply on Can't Use Auth::user() In A Controller Constructor

@REALRANDYALLEN - BOOM, right on the money. Thanks for that Real Randy!

27 Feb
4 months ago

DevMaster started a new conversation Can't Use Auth::user() In A Controller Constructor

Hello LaraV.I.Ps,

Is it right that, in a Controller constructor, I am not able to access Auth::user() [I mean, it is null] ?

Has the Auth::user() object not been bootstrapped yet so early in the flow?

Just curious really, thanks.

Kind regards, Dev

DevMaster left a reply on Laracasts Website Doesn't Work In Firefox

Thanks @cronix sorry I can't explain in any more detail. Though I can simply use Chrome so it's not a biggie for me. Thanks again.

DevMaster left a reply on Just Curious Why Laravel Mix Has All Dependencies In DevDependencies

Yep, as technically all that is needed to run the production site is the compiled JS file, Laravel (and no doubt some other tools) argue that Axios and Vue etc are "dev".

26 Feb
4 months ago

DevMaster left a reply on Form Model Binding In 5.7

@maverickchan that's fine for a "create new" form, but won't bind to existing model data for an "update existing" form.

25 Feb
4 months ago

DevMaster left a reply on Form Model Binding In 5.7

I'm not sure that {{$user->firstname ?? old('firstname') }} is really what a create or edit form will need; as this will never flash back the most recently entered value for 'firstname' (and will only ever show the value in $user->firstname).

I'm thinking it should be {{old('firstname') ?? $user->firstname}} instead which will initially show the value in $user->firstname and then subsequently show the most recently entered value.

Actually, we can simply pass a default into the old() helper thus: {{old('firstname', $user->firstname)}} https://devdocs.io/laravel~5.7/api/5.7/illuminate/http/concerns/interactswithflashdata#method_old

Kind regards, Dev

DevMaster left a reply on Request To Clarify Eloquent And $dates[] Behaviour

Thanks, I definitely experience what you describe there, but I can't (yet) see how that works in the source code reference you've given me. It seems like the source code only looks in $dates to know if something is "considered a date".

Let me look through that code again...

DevMaster started a new conversation Request To Clarify Eloquent And $dates[] Behaviour

Hello everybody,

Hope you are well.

This confuses me and I wonder if anybody could shed any light:

The Laravel docs state "When a column is considered a date, you may set its value to a UNIX timestamp, date string (Y-m-d), date-time string, or a DateTime / Carbon instance. The date's value will be correctly converted and stored in your database"

but does this behaviour only apply if you add the column to the model's $dates[]? Or does it apply regardless? I have been able to assign Carbon instances to timestamp columns and this has saved correctly to the DB, but the columns were NOT in $dates[]...

Kind regards, Dev

DevMaster left a reply on Laracasts Website Doesn't Work In Firefox

And now the /login page doesn't even appear to work in Firefox?!?!

20 Feb
4 months ago

DevMaster left a reply on "Reset Password" Email Template

And / or it looks like we can simply publish the notification fragments into our app: https://laraveldaily.com/mail-notifications-customize-templates/

DevMaster left a reply on Laracasts Website Doesn't Work In Firefox

@ARTHVRIAN - Thanks for the advice, @arthvrian, I'll try these ideas.

19 Feb
4 months ago

DevMaster started a new conversation Laracasts Website Doesn't Work In Firefox

Hello everybody,

Are we aware that the laracasts.com website doesn't appear to work in Firefox browser? At least the "Nova" series of videos doesn't work for me; the video player doesn't load and in the JavaScript console there is an error of [Error: Permission denied to access property "__rocketLoaderInlineHandlerProxy"].

Does anybody have any thoughts or knowledge about this?

Regards, Dev

15 Feb
5 months ago

DevMaster left a reply on Is Closed Caption Available For Hearing Impaired?

I would like to politely suggest that the lack of subtitles is a bit of a missed trick. Obviously hearing-imparied people would benefit, but it would make Laracasts easier in work environment where (for example) headphone use is frowned upon.

DevMaster left a reply on Why Isn't The 'deleted_at' Datetime Field Auto-casted?

@CRONIX - Thanks @cronix, the plot thickens. And good to know it's documented nicely! Though I would argure that $table->timestamps(); is also optional. Anyway thanks guys, no problem!

14 Feb
5 months ago

DevMaster left a reply on Why Isn't The 'deleted_at' Datetime Field Auto-casted?

@ARTHVRIAN - Thanks for the news, it does indeed look like 5.8 will change some of the Carbon integrations.

DevMaster started a new conversation Why Isn't The 'deleted_at' Datetime Field Auto-casted?

I see (from tinkering with Nova) that the 'deleted_at' datetime field (as generated by $table->softDeletes(); in a migration) is not auto-casted to a DateTime or Carbon instance.

BUT the $table->timestamps(); datetime fields are indeed auto-casted by Laravel: "By default, Eloquent will convert the created_at and updated_at columns to instances of Carbon, which extends the PHP DateTime class".

So I am simply curious to hear if there is any special practical or technical reason to exclude 'deleted_at' from auto-casting?

Many thanks, Dev Master

08 Feb
5 months ago

DevMaster left a reply on "Reset Password" Email Template

Thank you @talinon. It's good to see a step-by-step. Although I am still wondering why this particular email template is so much harder to customise than any other auth email template.

Anyway, thanks again!

DevMaster started a new conversation "Reset Password" Email Template

It confuses and disappoints to realise that (in Laravel 5.6) the "Reset Password" email template (that make:auth will generate) isn't easily customisable. Or maybe it isn't even customisable at all?!?

I was wondering if anybody in the Laracasts community had any advice or knowledge in this area? It's telling that this issue isn't at all mentioned in any Laravel documentation; and I think this is a real bad problem for the Laravel framework.

OK, thank you in advance.