EricZwart

EricZwart

Member Since 6 Years Ago

Velsen-Zuid

Experience Points
40,780
Total
Experience

4,220 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
458
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 9
40,780 XP
Aug
05
22 hours ago
Activity icon

Replied to Switching To Https Does Not Change Internal Urls

Thanks! I will set this too

Activity icon

Started a new Conversation Switching To Https Does Not Change Internal Urls

In a Laravel app I changed the site in production to https:// That is working on the urls but the image url (using spatie's medialibrary ) keeps is stil http:// So 'm Im getting mixed content en nog full SSL slot.

I'm using $project->getFirstMediaUrl . In the laravel .env it is also set to https://

Do I need to clear views or cache?

Thanks!

Jul
14
3 weeks ago
Activity icon

Started a new Conversation Cache Value From View Composer

Hi, I'm running a instagram package (using: https://github.com/pgrimaud/instagram-user-feed) that gets me the feed of an account. This al works fine.

I need it on every page (footer) so I put it in a View Composer and put that in a database cache. That almost works because it does show the key and expiration but the Value is always " N;" Other cache keys and values are working fine.

this is my model in App/Instagram.php

public static function GetInsta()
    {
        try {
            
            $cachePool = new FilesystemAdapter('Instagram', 0, __DIR__ . '/cache');
            $api = new Api($cachePool);
           $api->login('user', 'password'); // mandatory
            $profile = $api->getProfile('feedaccount'); // we need instagram username
            $medias = $profile->getMedias(); // 12 first medias
            return $medias;
            // });
        
        } catch (\Exception $e) {
            $medias = null;
            //echo 'Caught exception: ',  $e->getMessage(), "\n";
        }

This is the code in my AppServiceProvider.php

public function boot()
    {

        View::composer('*', function ($view) {
            $medias = Cache::remember('instagram', 600, function () {
                return Instagram::GetInsta();
            });

            $view->with('medias', $medias);
        });
    }      

Any advice would be welcome.

Jul
13
3 weeks ago
Activity icon

Replied to Error Handling On A Function/method

That is the one! Thank you!

Activity icon

Started a new Conversation Error Handling On A Function/method

Hi, I need some advice on placing a function and error handling.

I want an Instagramfeed on the footer of my site (12 little thumbs). I put the retrieved data in the cache for 5 minutes. That all works fine. (using: https://github.com/pgrimaud/instagram-user-feed )

But I need it on every page in the footer so I can put it in a helper file so I don't repeat myself?

The below is part of my HomeController.

$medias = Cache::remember('instagram', 600, function () 
            {
            $cachePool = new FilesystemAdapter('Instagram', 0, __DIR__ . '/../cache');
            $api = new Api($cachePool);
            $api->login('instaUser', 'instaPass'); // mandatory
            $profile = $api->getProfile('profilename'); // we need instagram username
            return $profile->getMedias(); // 12 first medias
            });
		
	$pages = Pages::where('title', 'Contact')->get();
         return view('contact', compact('pages','medias'));

My question: When this function does not work I just want to be able to load the page without the thumbs. Now when something is wrong in loading from instagram for example than all pages will crash (500 error)

What is the right way to prevent this? And give an alternative of leave it blanc.

May
24
2 months ago
Activity icon

Replied to "Valet Requires Homebrew To Be Installed On Your Mac." ERROR

Try to reinstall or remove node.js

May
23
2 months ago
Activity icon

Replied to Rewrite In Valet Driver

Does anyone have an idea for the question and for me? :-P

May
17
2 months ago
Activity icon

Started a new Conversation Rewrite In Valet Driver

I have an old project (non laravel) that i want to run locally in Valet. It uses an .htaccess for nice urls.

To get it to work I have to make a LocalValetDriver.php thats in the root of the domain/dir. But I cant nog find where to put the rewrites. It just does nog work.

Can anyone help me in the right direction what to put in the file. Or any sample?

the htacccess uses this rewrite rules:


RewriteRule ^([A-Za-z0-9-]+)/?$ type.php?tUrl=
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ brand.php?tUrl=&mUrl=
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ article.php?tUrl=&mUrl=&article= 

Thanks

May
09
2 months ago
Activity icon

Replied to The Problem When Creating A New Table In The Database.

unsinged() should be unsigned()

Apr
23
3 months ago
Activity icon

Replied to Image Upload Validation

Define it in your controller not to store it if there is no image. see: https://laracasts.com/series/laravel-6-from-scratch/episodes/65?autoplay=true at about 1:35

Activity icon

Replied to Image Upload Validation

Shouldn't you add

'sometimes|required|... 

?

Feb
04
6 months ago
Activity icon

Commented on Guzzle API Requests With Tests

Great tutorial! from the Dutch Jeffrey Way ;-P