bobbybouwmann

bobbybouwmann

Developer at Enrise

Member Since 6 Years Ago

Apeldoorn, The Netherlands

Experience Points
1,996,365
Total
Experience

0 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
1770
Lessons
Completed
Best Reply Awards
2622
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 50
1,996,365 XP
Oct
30
18 hours ago
Activity icon

Replied to Spatie Media-Library - Resize Main Image While Adding It To Media

The media library package doesn't support this functionality.

The reason being is that the original image is needed to perform certain actions in the package. You can of course delete the original image yourself after you're done with upload but I wouldn't recommend that ;)

Oct
28
2 days ago
Activity icon

Awarded Best Reply on How To Organize Multiple Projects Into A Single Project ?

You could make separated directories per service in your app/Http/Controllers directory. That should already be enough.

But as I understand it, you already have 4 projects. You can also combine them using an API and simply call the API on the homepage to get the service working. Otherwise, copy-pasting the controllers and models should already be enough ;)

Oct
24
6 days ago
Activity icon

Replied to The Token Could Not Be Parsed From The Request

It seems you're not providing the correct authentication token here. You have two options for that. Either as a header or part of the URL

For the header option, add this header

Authorization: Bearer {{ YOUR_TOKEN }}

Or using the URL

https://example.com/some-url?token={{ YOUR_TOKEN }}

Here are some people with the same issue: https://stackoverflow.com/questions/39218757/laravel-jwt-auth-the-token-could-not-be-parsed-from-the-request

Oct
21
1 week ago
Activity icon

Awarded Best Reply on Scraping Kijiji And FB Marketplace Data

Well, it depends on what you want to scrape from the specific websites. Those requirements determine what kind of package or API you need to use.

This is a good package for most use cases: https://github.com/spatie/crawler

Activity icon

Replied to Github Actions Push To Deploy

It looks like you configured the SSH key incorrectly. Did you add a secret for your SSH key? And did you copy in the correct value in there?

You can find some pointers here: https://github.com/appleboy/ssh-action/issues/6

Oct
20
1 week ago
Activity icon

Awarded Best Reply on Best Practice: Testing Nova Resources.

Yeah, Nova resources are a bit hard to test in the regular PHPUnit way.

The easiest way to write proper tests for this is by using Laravel Dusk. That is also how Laravel Nova itself is tested. You can assert certain things in the view and assert if actions do the correct thing. You can then verify in the database if everything was correct.

Another solution for example is doing a get request to the API call that is being called underwater for Nova itself and assert the response in there. However, Laravel Nova fires multiple API requests for once view, so you need to be aware of this.

Activity icon

Awarded Best Reply on Create L8 API - Not An SPA, No Passport Needed, Plain Old API

In older versions (5.8 for example) I could simply create an api_token field on the user's table and get cracking.

This approach should still work out of the box, as long as you set your auth guard to api. You can see the token implementation from Laravel here: https://github.com/laravel/framework/blob/8.x/src/Illuminate/Auth/TokenGuard.php

Make sure you send the correct headers in Postman.

Accept: application/json
Content-Type: application/json
Activity icon

Replied to Create L8 API - Not An SPA, No Passport Needed, Plain Old API

In older versions (5.8 for example) I could simply create an api_token field on the user's table and get cracking.

This approach should still work out of the box, as long as you set your auth guard to api. You can see the token implementation from Laravel here: https://github.com/laravel/framework/blob/8.x/src/Illuminate/Auth/TokenGuard.php

Make sure you send the correct headers in Postman.

Accept: application/json
Content-Type: application/json
Activity icon

Replied to Scraping Kijiji And FB Marketplace Data

Well, it depends on what you want to scrape from the specific websites. Those requirements determine what kind of package or API you need to use.

This is a good package for most use cases: https://github.com/spatie/crawler

Activity icon

Replied to Github Actions Push To Deploy

Yes and yes. What exactly is your question?

Oct
19
1 week ago
Activity icon

Replied to Using Yajra Datatables - Running Out Of Memory

The only way to make a large data set work is by using pagination. Even if your application (after throwing more memory at it) can handle it, your browser at some point can't take it anymore.

I would rather advise you to add some kind of search and filter options so you can limit the results you display ;)

Oct
18
1 week ago
Activity icon

Replied to Run Migrations Through .ebextensions File?

Are you sure you have the .env set up correctly and there is an actual working database connection? It could be that php artisan migrate just fails because it can't connect to the database.

You should be able to see some logs in storage/logs/laravel.log.

Activity icon

Awarded Best Reply on Composer Command

The command regenerates the list of all classes that need to be included in the project (autoload_classmap.php).

In Laravel the autoload_classmap.php also includes the providers in config/app.php. So when run this command your providers are being registered again.

Oct
17
1 week ago
Activity icon

Replied to Creating Db

Yes you can. You can use the config helper to switch database connections, by setting a new database setting. You can also run the artisans command programmatically. You can use the filesystem class or file_put_contents and create new migrations files and run the migrate command. That should all work ;)

Do note that if you generate migrations files on the fly, you won't have them in your code and probably also not in your version control. This could be dangerous.

Oct
15
2 weeks ago
Activity icon

Replied to Vue Js Flash Component Not Working When Npm Production Works Npm Run Dev

@andiliang Aah great you found the solution. I didn't know you showed it based on a generated class ;)

Oct
14
2 weeks ago
Activity icon

Replied to How To Validate Grading System In Model And Controller

Well, the only way to do this here correctly is using a custom rule class. In this class, you can create your own query based on the given values to check if a Gradesystem model already exist

Documentation: https://laravel.com/docs/5.8/validation#custom-validation-rules

Activity icon

Replied to How Can You Get One Random Result From A "morphedByMany" Relationship?

@chrislentz Aah yeah, this is correct. This is because the morph queries use a join. So I don't think there is a way to make this work with just one result then...

You're probably better of with a raw query here, but then you need a way to also include the poster relationship. Eloquent works for 95% of the cases, but sometimes it's a pain in the as.

Activity icon

Replied to Find Item That Has Different Names But Refer To The Same Item

Well, you have a few options here. The basic idea is the same though. You need to have a central place where you can map the name to a generic name. This can be a database or a config file as an example. Once you have a lookup structure like that, you can write one method that always gives back to the correct string for you, no matter what you feed it.

Here is a database example

$courseName = CourseNames::where('name', 'Inglés I')->first();
$courseName = CourseName::find(($courseName->parent_id);

$course = Course::where('name', $courseName->name)->where('num', $num)->first();

Another solution is using a one-to-many relationship. between course and coursename. This way, you can make it even simpler

As you can see, lot's of options here.

Activity icon

Replied to Leaderboard Rewards

@jeffreyway THE SOCKS!! DON'T FORGET THE LARACASTS SOCKS! I NEED IT!!

Activity icon

Replied to Leaderboard Rewards

Hee @jeffreyway

Thanks for reaching out! It's great that your working on a different reward system, other than experience points. I personally backed down a little bit the last few months, to give other people a chance to answer questions and step up in the community. I still love doing it, and I will keep doing it for sure ;)

I definitely think a month or quarterly reward system would give newcomers to the community a kickstart for sure. The leaderboard itself is very cool, so it would be nice if we probably can keep both. Where you have the "old" people and the "new" people who put in an effort for a few months.

Regarding the rewards. A new set of unique badges would be cool. Since the introduction of badges, there is some kind of gamification in Laracasts. I personally have all badges, so it would be cool to see some new ones. Could even be a badge like "Monthly top contributor", "Guest speaker" or even "Watcher of 99% of the content". I think there are a ton of badges you can still come up with.

Finally, I want to thank @jeffreyway for all the opportunities Laracats brought me. I got the chance to help others get their dream job, make them better developers, and build a name in the community. Since I started contributing to Laracasts I have spoken at conferences and meetups, I found a full-time job as Laravel Evangelist, I'm part of multiple startups and have been consulting on Laravel. Even released my own video here on Laracasts. How awesome is that?

Activity icon

Awarded Best Reply on Laravel Passport Access Tokens Timezone

That depends on what you put in the token of course. You can create time-based tokens in theory.

My first thought would be to double-check the time on the server itself. Are they up to date at all? If not, you should fix that first ;)

If that is not the issue, can you tell us more about your setup?

Activity icon

Replied to Laravel Passport Access Tokens Timezone

@neilstee Awesome! Could you mark the answer then ;) Might be useful for others as well

Oct
11
2 weeks ago
Activity icon

Replied to How Can You Get One Random Result From A "morphedByMany" Relationship?

I would expect that the second example would work here... If you have the laravel debugbar package or laravel telescope installed you can see what exact queries are performed. Laravel doesn't make a join query here, but instead it uses multiple queries to fetch each relationship.

Activity icon

Awarded Best Reply on Laravel Auth - Maser Password

So you are on the correct path. However, Laravel uses $fillable for all the fields you can edit in your User model. By default, it whitelists the fields you can insert/update. However, permission_level is probably not part of this list

Here is where you need to look for: https://github.com/laravel/laravel/blob/master/app/Models/User.php#L19

Oct
10
2 weeks ago
Activity icon

Replied to Get The Ftp Upload Percentages With Laravel FileSystem

You can do a check if the files exist, right? Just doing an ajax call to the backend should fix that

Activity icon

Replied to Security For SPA

I'm personally a big fan of splitting the backend from the frontend. You can still use the cookie-based authentication layer, as long as you run both websites on the same base domain. So you can run your API on api.example.com en run your frontend on example.com. That way the cookie should work just fine ;)

I do see a challenge when you start using a mobile app. I think it's harder to keep a cookie in there for the authentication. If you decide to connect multiple systems to your backend I would highly recommend Laravel Passport instead of Sanctum since it's more flexible for different ways of authentication.

Activity icon

Replied to Trying To Get Property 'ProjName' Of Non-object

Well, you can' do this

@foreach($project as $project)	

@endforeach

You assign the same variable here. I would expect the $projects variable here instead

@foreach ($projects as $project)

@endforeach

Can you show your controller that returns this variable?

Activity icon

Replied to Vue Js Flash Component Not Working When Npm Production Works Npm Run Dev

Mmh, that is very odd. npm run production is doing the same thing as npm run dev, but instead it just minifies everything.

Are you sure this.flash is correct here? I see that you assign window.flash, should you call window.flash in your component instead?

Activity icon

Replied to Get The Ftp Upload Percentages With Laravel FileSystem

You need some kind of library for this to make this work. This is not something Javascript supports out of the box. Here is a useful tutorial: http://www.onlinecode.org/php-laravel-file-upload-with-progress-bar-example/

Activity icon

Replied to Laravel Auth - Maser Password

So you are on the correct path. However, Laravel uses $fillable for all the fields you can edit in your User model. By default, it whitelists the fields you can insert/update. However, permission_level is probably not part of this list

Here is where you need to look for: https://github.com/laravel/laravel/blob/master/app/Models/User.php#L19

Oct
08
3 weeks ago
Activity icon

Replied to Best Practice: Testing Nova Resources.

Yeah, Nova resources are a bit hard to test in the regular PHPUnit way.

The easiest way to write proper tests for this is by using Laravel Dusk. That is also how Laravel Nova itself is tested. You can assert certain things in the view and assert if actions do the correct thing. You can then verify in the database if everything was correct.

Another solution for example is doing a get request to the API call that is being called underwater for Nova itself and assert the response in there. However, Laravel Nova fires multiple API requests for once view, so you need to be aware of this.

Activity icon

Awarded Best Reply on Help Calling Key From Folder Config File Services.php

Did you clear your config? It could be that your .env is cached. Try running php artisan config:clear

If that doesn't work you can try to debug it by doing dd(config('services')) to see what kind of data that whole array hokds.

Activity icon

Replied to Memory Error Trying To Use Socialite/passport

Above method doesn't work for windows. Try this

set COMPOSER_MEMORY_LIMIT=99999999999 && php -d memory_limit=-1 composer.phar update

Replace composer.phar with the correct path

Activity icon

Replied to Laravel 8 Factories: Access Overriden Attributes From Definition()

In the state method you get access to all the current generated attributes, from there you should be able to generate something based on precious set data.

Activity icon

Replied to Help Calling Key From Folder Config File Services.php

Did you clear your config? It could be that your .env is cached. Try running php artisan config:clear

If that doesn't work you can try to debug it by doing dd(config('services')) to see what kind of data that whole array hokds.

Activity icon

Replied to Object Storage Disk Not Changing From Public With Spatie/laravel-medialibary

Did you clear your config? If could be that your .env if cached. Run php artisan config:clear for that

Activity icon

Replied to Why CORS Error With Axios Request To Youtube/v3/video

It could be that localhost is not allowed as a domain to do these requests. If you would use a valid domain name it should work correctly

Oct
07
3 weeks ago
Activity icon

Awarded Best Reply on How To Validate Fields In Maatwebsite Excel Import

This should get you started: https://docs.laravel-excel.com/3.1/imports/validation.html

Let me know if you're stuck with one of the rules :D

Activity icon

Replied to Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" Main Defined

@godzilaravel Well, let's hope someone didn't put a gun on you to get this working 😅

Activity icon

Replied to Duplicate Record With Same Number

@bugsysha She is saying yes to me sitting behind my laptop helping people here ;)

Activity icon

Awarded Best Reply on Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" Main Defined

You need to update all your @babel dependencies to at least v7.8.7

Source: https://github.com/babel/babel/issues/11216

Activity icon

Replied to Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" Main Defined

You need to update all your @babel dependencies to at least v7.8.7

Source: https://github.com/babel/babel/issues/11216

Activity icon

Awarded Best Reply on Certification Question: When Not Use Serialization

The correct answer here is 2. If you serialize them they lose all logic, including the references to relationships.

This is a tough question though! Did you pass the certification?

Activity icon

Replied to Fortify For Multi-auth

As far as I can see in the code it's only focused on one guard. In general, an extra guard is normally used for APIs or third party access. Not for a user and admin guard.

Also, note that Fortify is there to give you a quick start, it won't fit all cases.

Activity icon

Awarded Best Reply on Systemic DB Error During And After Composer Install ???

It seems that one of your service providers is hard wired to some database call. Because of this, composer won't be able to autoload those files.

You can find try to migrate the database and then run composer install again to see that it works. You would have to do this manually on the server using the command line.

In general, your ServiceProvider shouldn't need access to the database. You should look for the usage of this table and refactor that to a different solution ;)