GTHell

GTHell

Member Since 2 Years Ago

Cambodia

Experience Points
12,420
Total
Experience

2,580 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
14
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
12,420 XP
Jul
10
12 hours ago
Activity icon

Replied to Should I Put Foreign Key On A Has Through Table?

@tray2 I'm also in a state of considering between view vs temporary table because the the sql result is using a lot for reading. You see, there's a lot of way to do this , get relation between Table A and Table D, and none is the best way. I kinda need some in depth design for this.

Sorry, I can't really share the schema design but just note that my design is completely normalized and the relation is big which mean there's a lot of join query. View is good but I need to do more query on it also which may cause a performance problem Temporary table might solve the performance problem it's might lead to inconsistent data when the main table got update.

Activity icon

Replied to Should I Put Foreign Key On A Has Through Table?

@michaloravec I always get this feeling of having a bad design. Guess I'm thinking too much.

Activity icon

Started a new Conversation Should I Put Foreign Key On A Has Through Table?

So, say Table A belong to Table B, and Table B belong to Table C, and Table C belong to Table D. As you can see there is a relationship between Table A and Table D through many other table. This is queryable but might lead to error and unreadable query. My question is it good idea to just put the foreign ID of Table A in Table D ?

Jul
09
1 day ago
Activity icon

Started a new Conversation How To Handle File Attachment Accessibility?

I got user A with a private file attachment but he then can expose those file to a post model which mean other users that has access to that post can also access the file attachment but the belonging is still to user A.

What is the flow for this? Currently, I use polymorph on Post model, Document model ...etc and user A can give the file attachment's access to user B through these model. I hope there's a better one than what I am doing.

This is the current design model.

Jul
08
2 days ago
Activity icon

Replied to Use Vimeo For Storaging Private Video?

@claydog Thank for you sharing. Good to know Vimeo could have save my time worrying about video storaging.

@drehimself I see. I guess Vimeo is better than.

@mwguerra Oh, they do have streaming. That's great feature to implement into my platform.

Jul
07
3 days ago
Activity icon

Replied to Use Vimeo For Storaging Private Video?

@bugsysha But isn't youtube has limited time for a video that could upload?

Activity icon

Started a new Conversation Use Vimeo For Storaging Private Video?

Has anyone done private video storing with Vimeo pro?

I’m seriously in need of video service with private and public just like laracast. Could you help share your experience.

Jul
04
6 days ago
Activity icon

Replied to Are The Laracasts Php Tutorials Enough To Learn Php?

3 years ago I didn't learn PHP but laravel. You get the idea.

Activity icon

Started a new Conversation Why AWS Over Digitalocean?

What is the benefit of AWS? Bandwidth is cheaper, server is cheaper and storage is cheaper on DO.

Activity icon

Replied to How Do You Serve A Private/authenticated Only File With S3?

@martinbean That's a long doc but worth reading.

Jul
03
1 week ago
Activity icon

Replied to How Do You Serve A Private/authenticated Only File With S3?

@martinbean How about caching? How does it work?

Jul
02
1 week ago
Activity icon

Replied to How Do You Serve A Private/authenticated Only File With S3?

What would the user request url would be?

Jul
01
1 week ago
Activity icon

Started a new Conversation How Do You Serve A Private/authenticated Only File With S3?

I'm using S3 to store all users media like images and pdf file. How would do I serve the authenticated user their file only? I see something like generate url with expiration. Does it mean I need to generate user a new url file all the time? What about caching?

Activity icon

Replied to Will Update PHP 7.3 To 7.4 Break Anything?

@alex_b Thank, I'll try doing in production.

@coding_field I check the PHP 8. it's great but introduce many breaking change. I hope all these Laravel package has backward compatibility when the do the upgrade (Most spatie package doesn't have backward compatibility)

Activity icon

Replied to Will Update PHP 7.3 To 7.4 Break Anything?

@coding_field Is it in production right?

@martinbean I can't find any good result googling about upgrading php in Laravel. Mostly it's only Laravel upgrade that usually break. But I would like to know the possibility also. I didn't write test for all function and it make it hard to test the whole application.

Activity icon

Started a new Conversation Will Update PHP 7.3 To 7.4 Break Anything?

Some library I want to use require higher PHP version. Will it break my app?

Jun
29
1 week ago
Activity icon

Replied to Get Auth()->user In Test?

@bobbybouwmann Haha, guess I didn't know that. Didn't read the Doc :)

Activity icon

Started a new Conversation What Is Your Favorite Deployment Pipeline?

Mine, using Github action for CI/CD=> Dockerfile -> Github repo -> trigger action -> push image to registry -> pull image from registry to server -> docker stack deploy (DigitalOcean)

Activity icon

Awarded Best Reply on Get Auth()->user In Test?

I just google that I could use $this->be() to authenticate myself.

Activity icon

Replied to Get Auth()->user In Test?

I just google that I could use $this->be() to authenticate myself.

Activity icon

Started a new Conversation Get Auth()->user In Test?

I want to test out my service that use auth()->user? How do I mock this?

Jun
26
2 weeks ago
Activity icon

Replied to What Web Server Do You Use For Your PHP Laravel Projects?

Nginx. I need to do reverse proxy for multiple services and apache can't do that easily that :)

Activity icon

Replied to How To Deployseparate React App And Laravel Api Back End?

You can just normally deploy your react and laravel to server and just setup the react env to point to your laravel?

Activity icon

Replied to Laravel Deployment - The Easy Way

Are you familiar with Docker? I suggest DigitalOcean + docker. Either docker compose or just running a docker file with persisted data is easy way to manage and scale your application.

Activity icon

Replied to Should Key Be Generated During Image Build?

Then I need to do a clean init (key:generate, passport:keys ..etc) once and copy it to the env and pass it back to container .env? I'm quiet confusing about this.

My app is update frequently except the env

Activity icon

Started a new Conversation Should Key Be Generated During Image Build?

Should I run key generate during the docker image build?

Activity icon

Started a new Conversation How To Output Oauth Secret To Environment Path Automatically?

I'm deploying my staging application which using Passport. I need to run certain script that refresh database + doing php artisan passport:install. I need to use those client secret in my own app and I refer it through .env.

The problem is that I can't seem to find a way to do it automatically without copy that secret and manually pasting it to .env

Thanks!

Jun
21
2 weeks ago
Activity icon

Started a new Conversation Is There Anything That I Should Concern About Using Laravel-websockets?

I choose laravel-websockets because it's much easier to setup. But since it's a php websocket, what should I be concern about? I heard that it has memory leak because of php can't handle long running service. Is it true?

Jun
19
3 weeks ago
Activity icon

Replied to Recommend A Good Chat Package?

This is what I am looking for :)

Thanks!

Jun
18
3 weeks ago
Activity icon

Replied to Why NoSql Still Not Popular Among Most Users Compare To Relational Database?

@jlrdw I would use mongo for storing chat and sql for well plans project. But a team of 2 or 3 like mine doesn't have a luxury to go both.

@willvincent usually, a people without a complaint tend to design the worst database then throw the away their project mid way because. Seen a lot, especially the sql fan boy.

Activity icon

Started a new Conversation Recommend A Good Chat Package?

My current implementation was just like a post with pagination except it's user+message+real-time. I would prefer package all day than implementing it myself! (Mine doesn't have group chat)

Activity icon

Replied to How To Handle Session? (not User Authentication Session)

I always had this feeling that cron will eat up all my vps resources although it's fine to do it periodically xD

I just added laravel-websockets + some cron tasking that do heavy operation. Let's see how it does on $5 digital ocean for 1000 users!

EDIT: It seem like what I've asked could be resolve with presence channel. So the whole solution to problem was a real-time solution.

Jun
17
3 weeks ago
Activity icon

Replied to How To Handle Session? (not User Authentication Session)

@bobbybouwmann I also require the to notify user 10 minute prior to meeting. Does that mean I need to do cron every minute and send real time event? Sound like an expensive operation!

Activity icon

Started a new Conversation How To Handle Session? (not User Authentication Session)

I want to add a live meeting session that user can join and leave and have tables that record everything. The join record could be store as soon as the user join or click a button but what about leaving? What if user forgot to click the leave button? What approach to make sure that a record for both join and leave could be recorded?

What I've done previously was to have a join and leave button but user tend to forgot to click the leave button and left session incomplete. I need to manually setup session timeout like scheduler and add leave record to the user. But what could be a better way than this?

EDIT: I'd appreciate if you could leave me links for further reading since my google search only result in session related to HTTP session.

Activity icon

Replied to Why NoSql Still Not Popular Among Most Users Compare To Relational Database?

So basically you’re saying NoSQL should be widely used so you can be lazy with designing your database schemas…? That’s not what NoSQL is for. At all.

I hate to admit this but yes, I find it hard to structure a project that need to deliver 2x time faster than when it suppose to complete.

Through my experience, I find that modifying the RDMBS is much harder on a medium to larger system because one relation change could mean a rewrite to the entire business logic. Everything need to be specs out. Sure small thing like missing column could be added easily but that's not the point I'm referring too.

Jun
16
3 weeks ago
Activity icon

Started a new Conversation Why NoSql Still Not Popular Among Most Users Compare To Relational Database?

Not saying that it's bad but comparing with RDBMS, the adoption rate is much lower. The problem with RDBMS is that it's really hard to maintenance and push fast.

Trying to be agile with RDBMS is hard cause you have to plan out for everything ahead in a water flow model otherwise you gonna end up screwing the whole system.

IMO, any small to medium app is better off with NoSql than RDBMS.

Jun
15
3 weeks ago
Activity icon

Replied to How Do I Keep History Of Relation In Database Design?

Hi @martinbean ! The subscription doesn't have FK point to user but user does! I will show you the sample data below

*Users*
----------------------------------------------------------------------------------------
ID		username		subscription_id		other_field
1		User1			1					...

*Subscriptions*      (subscriptions belong to a special generation table)
---------------------------------------------------------------------------------------
ID		type			generation_id		other_field
1		premium		3					...


*Subscription_AnnualPrice*
---------------------------------------------------------------------------------------
subscription_id		price_id						
1					1

*prices*
---------------------------------------------------------------------------------------
ID			Name				other_field
1			30% Discount		....

As you can see, subscription table belong to a generation table and has many other relationship and column.

Activity icon

Started a new Conversation How Do I Keep History Of Relation In Database Design?

I can't figure out how to design a database to keep tracking of old data.

For isntance, -> users table has relation with subscription table for 1 years -> subscription table has relation with many other table -> query other tables through subscription table is possible until user got a new subscription for another new year which mean the subscription table need to insert new data and assign user a new subscription foreign id, or modify it current subscription while keeping the ID

The problem to either of this one solution is how to keep track of the last year subscription?

The subscription information should always be the same except the year columns.

Jun
14
3 weeks ago
Activity icon

Replied to Laravel-websockekts Vs Laravel-echo?

@tinfoilman it should be phrase echo-server vs laravel-websockets. What was the pain in butt going through this package?

Activity icon

Replied to Laravel-websockekts Vs Laravel-echo?

Doesn't it mean I need to stick with these overly expensive 50 concurrent user at time chat services?

Activity icon

Started a new Conversation Laravel-websockekts Vs Laravel-echo?

I'd never use laravel-echo-server + redis in production before but I hate that setting it up is tedious and it apply many layer for me to maintenance. Pusher make thing simpler but the cost just doesn't account for number of usage I had. What about laravel-websockets? I'm asking about it performance in production. Mostly, I'll do only private chat.

Activity icon

Replied to Should I Store Status/data On Pivot Table?

Thank you guy for the decision! I actually had another table because I forgot the answer table so everything now store in that table :)

Jun
08
1 month ago
Activity icon

Replied to Should I Store Status/data On Pivot Table?

Is it hard to query later on?

Activity icon

Started a new Conversation Should I Store Status/data On Pivot Table?

For instance, I want a user has many assignment and assignment has many user which will need a user_assignment table. Should I store the assignment completed on that pivot table or just create a new table that log all the assignment that done?

should there be a query problem with pivot then separate table would be great?!

Jun
02
1 month ago
Activity icon

Replied to Nginx + Php-fpm In One Dockerfile?

Thank you guys I use richarvey/nginx-php-fpm as this image provide everything and I only need to do pecl install require redis extension and copy my laravel folder in. Cheers!

I had to choose best answer though!

May
30
1 month ago
Activity icon

Replied to Nginx + Php-fpm In One Dockerfile?

I tried to install Nginx on the php-fpm image too but there're some problems with that. I'll try using alpine to follow your setup above.

Activity icon

Replied to Nginx + Php-fpm In One Dockerfile?

Yeah, I just want to a pre-setup phpfpm + Nginx so I can extend to install Redis. Basically, I need the Laravel server in one docker image so I can easily set up another Nginx reverse proxy in my docker-compose.

The above dockerfile is great but isn't it redundant to reinstall the php again?

@mkshingrakhiya May I know the image size?

Activity icon

Replied to Nginx + Php-fpm In One Dockerfile?

That's a great image except I can't do pecl install or call php command.

Activity icon

Started a new Conversation Nginx + Php-fpm In One Dockerfile?

I want to deploy my nginx + php-fpm in one image. Is there anyone done this before?