man-u-l

man-u-l

Member Since 6 Months Ago

Grecia, Alajuela, Costa Rica

Experience Points
10,500
Total
Experience

4,500 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
95
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

Level 3
10,500 XP
Apr
06
3 months ago
Activity icon

Replied to Laravel Scheduler Run On First Wednesday On Each Month At 9pm

Thanks, I thought about that but for some reason I think it will still run every wednesday, I will test and report back.

Activity icon

Started a new Conversation Laravel Scheduler Run On First Wednesday On Each Month At 9pm

I am moving all my cron jobs to laravel scheduler and I am super happy about how awesome this is and now my cron jobs are part of my source control.

One particular job need to be ran on the first wednesday of each month at 9pm, with cron I just had it run each wednesday at 9pm and inside my script I would do a check to see if that wednesday was the first of the month, but with Laravel I see there are plenty of options to do this, I just dont know how to combine them to get that same date.

Thanks!

Mar
26
3 months ago
Activity icon

Started a new Conversation Problems Sending Email Mail With Bluehost Via PHP Or Laravel

We use Laravel to queue sending emails from an external legacy app that a few clients use, one of those clients use Bluehost for their email and that client is unable to send email via PHP or Laravel, the worst part is that there is no error, the email is sent but never arrives, if I login via webmail and send an email it works fine.

I found this page with details about sending via PHP script:

https://www.karavadra.net/php-mail-function-with-bluehost-working/

But that no longer works, same thing happens, no error but email is never sent.

Any pointers will be greatly appreciated.

Activity icon

Replied to How To Add A Done() Macro To The Srt::() Class

I started a new thread for the fix, here it is in case someone gets here looking for the right answer:

https://laracasts.com/discuss/channels/laravel/problem-adding-macro-to-appprovidersappserviceproviderphp

Activity icon

Awarded Best Reply on Problem Adding Macro To App/Providers/AppServiceProvider.php

Thanks a lot, that did not work, but lend me to the right fix:

Stringable::macro('done', function () {
            return (string) new static($this->value);
        });
Activity icon

Replied to Problem Adding Macro To App/Providers/AppServiceProvider.php

Thanks a lot, that did not work, but lend me to the right fix:

Stringable::macro('done', function () {
            return (string) new static($this->value);
        });
Activity icon

Replied to Problem Adding Macro To App/Providers/AppServiceProvider.php

Thanks,

I have changed it to:

Stringable::macro('done', function ($value) {
            return (string) $value;
        });

And now I get:

Too few arguments to function Illuminate\Support\Stringable::App\Providers\{closure}()
Mar
25
3 months ago
Activity icon

Started a new Conversation Problem Adding Macro To App/Providers/AppServiceProvider.php

I added:

Str::macro('done', function ($value) {
      return (string) $value;
});

To app/Providers/AppServiceProvider.php inside the boot method but when I try to use it as such:

Str::of(‘text’)->append(‘content’)->done();

I get error: Method Illuminate\Support\Stringable::done does not exist.

I have cleared cache and ran composer dump-autoload but same problem.

Any suggestions?

Mar
21
3 months ago
Activity icon

Replied to How To Add A Done() Macro To The Srt::() Class

I added:

Str::macro('done', function ($value) {
      return (string) $value;
});

To app/Providers/AppServiceProvider.php inside the boot method but when I try to use it as such:

Str::of(‘text’)->append(‘content’)->done();

I get error: Method Illuminate\Support\Stringable::done does not exist.

I have cleared cache and ran composer dump-autoload but same problem.

Any suggestions?

Activity icon

Replied to Clear Horizon Failed Jobs Redis

For whatever reason that did not work but took me to the solution:

exec('redis-cli --scan --pattern horizon:failed_jobs | xargs redis-cli del');

I added this to a horizon:flush command and now those failed jobs are gone this of course is after I check each one of them and solve the problem.

Just for information this is what I tried:

redis-cli --scan --pattern Laravel_horizon:* | xargs redis-cli del
redis-cli --scan --pattern horizon:* | xargs redis-cli del

I also tried:

Redis::connection()->del('horizon:failed_jobs');

And

Redis::connection()->del([config('horizon.prefix').'failed:*']);
Redis::connection()->del([config('horizon.prefix').'failed_jobs']);

But neither of those worked either.

Activity icon

Started a new Conversation Clear Horizon Failed Jobs Redis

I have done a few things to try to clear Horizon failed jobs but the only thing that works is if I manually go to the Redis keys and delete them under horizon:failed_jobs

I even made a horizon:flush command like so:

public function handle() {
        $this->info('Calling queue:flush ...');
        $this->call('queue:flush');
        foreach ([config('horizon.prefix') . 'failed:*', config('horizon.prefix') . 'failed_jobs'] as $delCommand) {
            $this->info('In Redis, calling `del` with: ' . $delCommand);
            Redis::connection()->del([$delCommand]);
        }
        $this->info('Deleted each individual failed job from Horizon and deleted failed_jobs from Horizon.');
    }

But in the Horizon failed jobs tab they never get deleted.

Im running latest version of Laravel and Horizon as of today.

Activity icon

Awarded Best Reply on Horizon Completed Jobs Empty

I had a weird bug that was making some queue jobs fail and nothing to show under completed, now that I fixed that I am getting completed entries

Activity icon

Replied to Horizon Completed Jobs Empty

I had a weird bug that was making some queue jobs fail and nothing to show under completed, now that I fixed that I am getting completed entries

Activity icon

Started a new Conversation Horizon Completed Jobs Empty

In production under a subdomain Horizon shows nothing in the Completed jobs tab, when a queue job fails I do see those entries in the Failed Jobs tab, but Completed shows nothing no matter how often I check.

I am using Redis for my queues and everything else works great, to load horizon I have a daemon that runs php artisan horizon command at startup on a Mac.

Mar
17
3 months ago
Activity icon

Replied to Telescope Keeps Scanning On Production Subdomain With Entries In DB

Thanks, I have posted the question there, I will post back if they reply

Activity icon

Started a new Conversation How To Add A Done() Macro To The Srt::() Class

I recently need it to cast a Str::() result to string, I got some help and I was told to ad ->__toString() to get the desired result, that worked great, but in the video: https://laracasts.com/series/whats-new-in-laravel-7/episodes/2 Someone mentioned:

"First thing I did was to add a done() macro to the class to return the value e.g.

Str::of(‘text’)->append(‘content’)->done();

IMO it’s cleaner than using (string) or ->__toString()"

->done() looks much better and cleaner than ->__toString()

How can this be done.

Thanks in advanced!

Activity icon

Started a new Conversation Telescope Keeps Scanning On Production Subdomain With Entries In DB

When in local environment Telescope works as expected, when I moved to production telescope saves the entries in the database but in the browser it keeps scanning and entries never load.

I have Laravel installed in a subdomain with SSL working.

In safari when I look at the network tab and reload the page I get an error for loading the entries:

xhr failed to load resource: The network connection was lost

If I open the page in FireFox the entries load fine but they dont auto load, I have to manually refresh the page to see new entries.

I have uninstalled Telescope, installed it again, clear the DB tables of all the entries and nothing seems to work.

This is under Laravel 7.1.3 and Telescope 3.1

Any pointers will be greatly appreciated.

Mar
16
3 months ago
Activity icon

Commented on Fluent String Manipulation

Great idea, any chance you can briefly explain how to do this?

Activity icon

Replied to Fluent Strings Str::of() Returns Illuminate\Support\Stringable And Not Result

Thanks, any reason why it behaves different than str_after() and why it needs to be casted to string?

Mar
15
3 months ago
Activity icon

Started a new Conversation Fluent Strings Str::of() Returns Illuminate\Support\Stringable And Not Result

I did some test but rather than getting text back from this:

$slice = Str::of('This is my name')->after('This is'); 

I get back:

Illuminate\Support\Stringable 

And when I try to return its value in a JSON response $slice is empty

In my controller I have

use Illuminate\Support\Str;

$slice = Str::of('This is my name')->after('This is'); 

return response()->json([
            'data'       => ['text' => $slice]
        ], 200);

But the JSON response data is empty.

Any pointers will be greatly appreciated

Feb
19
4 months ago
Activity icon

Replied to Deployment Of Laravel App On Apache Server

Thanks, perfect that is what I did.

I can feel good now and I am ready to post a guide here for those using FileMaker Server and want to also use Laravel.

Activity icon

Started a new Conversation Deployment Of Laravel App On Apache Server

I am new to programming so please bear with me.

We have a FileMaker solution that we have developed over the past 5 years, it does a lot for us but FileMaker has its limitations, that is why I started to learn PHP and fell in love with it because of Laravel, for some of the stuff FileMaker cannot do or does poorly I have now created a Laravel App that interacts via an API with FileMaker and helps it do all kinds of cool things.

The Laravel App I developed on my local MacBook using Laravel Valet, VSCode and Postman, all functionality works great in my local environment .

FileMaker server installs its own version of PHP and uses Apache, and anything that you put inside the /Library/FileMaker\ Server/HTTPServer/htdocs/ or /Library/FileMaker\ Server/HTTPServer/htdocs/httpsRoot/ will be accesible via the IP or URL of your FileMaker server, so in essence the httpsRoot/ directory is like the public_html of shared hosting.

My question is, I will put the App folder inside this directory as such httpsRoot/laravel, then I will change my httpd.conf and point the DocumentRoot to /htdocs/laravel/public

In my testing this works, but I want to make sure it is secure to do it this way and it all my confidential files such as .env will not be visible.

I plan to make a guide for how to do this here since there are a few more steps involved, but for now I will like to make sure I am doing this correctly as far as Laravel security goes.

Jan
19
5 months ago
Activity icon

Replied to Passing Data From Mailable Job To Balde View

I’m able to pass data with regular emails but as soon as I add the mail to the dispatch job I cannot pass data.

Activity icon

Replied to Passing Data From Mailable Job To Balde View

Hi, I am having the same exact problem, if you found a solution can you please share it.

Thanks!