GTHell

GTHell

Cambodia

Member Since 1 Year Ago

Experience Points 9,820
Experience
Level
Lessons Completed 14
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

11 Dec
14 hours ago

GTHell left a reply on What Is The Flow That You're Following When Developing API Application?

@wilk_randall what about other thing like fetching data? I find everything to be extra work. CRUD is extremely time consuming.

GTHell started a new conversation What Is The Flow That You're Following When Developing API Application?

I never go full API application between Laravel + Vue. The problem is it's time consuming to develop web app with API. For example, the form validation is extra work when using API + Vue.

07 Dec
4 days ago

GTHell left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

@munazzil But my problem was to find a work with npm.

05 Dec
6 days ago

GTHell left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

The jquery $ suppose to work fine. I think it's the problem with defer attribute in script tag. <script src="js/app.js" defer></script> when I remove the defer keyword, the jquery work but not the Vue. Well, I need both vue and jQuery...

GTHell left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

Yeah man it's suck. I need to import jQuery twice. One from npm and another one for whatever snippet I want to use in Laravel blade.

GTHell left a reply on So, How Exactly Do You Get JQuery From Webpack To Work With Blade?

@jlrdw How do you import the webpack into your laravel blade?

04 Dec
1 week ago
03 Dec
1 week ago
02 Dec
1 week ago

GTHell left a reply on Tips On Doing/query Report

@JLRDW - Joining table is simple using eloquent. The challenges is that, joining too much will result in huge column list. I think I'll just throw all column and make use of front end javascript to do the sorting.

Should sorting/select be done in front end or back end? Gotta admit that I never do much report before beside CRUD.

GTHell started a new conversation Tips On Doing/query Report

I don't know what user want so It would be good to give them choice. Since the user can't do SQL, what are some way to generate a query builder with front end?

24 Nov
2 weeks ago

GTHell left a reply on How To Generate Report?

@jlrdw Thank, I choose to go with C# because it's seem easier than all of this.

21 Nov
2 weeks ago

GTHell left a reply on What Is The Efficient Way To Store Config Option?

take a look again and it seem akaunting settings package is better than laravel config.

19 Nov
3 weeks ago

GTHell left a reply on What Is The Efficient Way To Store Config Option?

I decide to go with config facade and name the file settings.php

GTHell left a reply on What Is The Efficient Way To Store Config Option?

@ianfain I assume that you already have multiple databases since it's e-commerce. I would store store settings in key-value database.

{ 
  "base_currency": "usd",
  "exchange_rate" : {
      "eur" : 1.4.....
   ....
}

GTHell left a reply on What Is The Efficient Way To Store Config Option?

@cronix Cache it with what?

@ianfain If it a big app then just use key-value pair database for setting. Mine is small app focus on performance so I don't want to waste performance with database connection.

GTHell left a reply on What Is The Efficient Way To Store Config Option?

@cronix It's rarely change. It's a company policy set by admin on the backend. It's more like a global settings where end point consume the API but can only change by the back office admin. Hardcode it is not preferable because office people can't code.

GTHell started a new conversation What Is The Efficient Way To Store Config Option?

Like in video game you have different setting for different thing. Having those config option store in database and query it every time doesn't look efficient. Is there a way of doing it that I'm missing? XML?

GTHell left a reply on How To Generate Report?

@jlrdw what solution to turn it into the excel file?

GTHell left a reply on How To Generate Report?

The link doesn't work.

18 Nov
3 weeks ago

GTHell started a new conversation How To Generate Report?

On C# they have something call Crystal report and Jasper report for Java. My point is, I want a report solution similar to those I mention.

I'll have the data showing as table but need some functionality to display the print + download as excel file because isn't everyone using excel in the office?

15 Nov
3 weeks ago

GTHell started a new conversation Can I Get A The Current Inserting ID Without Query For The Last ID?

I want to generate a column but it involve time + current row id for easy reference. How can I do it if the ID only available once the data is inserted?

12 Nov
4 weeks ago

GTHell left a reply on How To Efficiently Check For Holiday In Laravel?

@lostdreamer_nl there's only one transaction(ticket) at one time. What is the 'start' and 'end'?

09 Nov
1 month ago

GTHell left a reply on Store Multiple Image Path In One Column Separated By ;? Yay Or Nay?

@cronix haha, I didn't know why I think that's a good idea in the first place.

08 Nov
1 month ago

GTHell left a reply on Store Multiple Image Path In One Column Separated By ;? Yay Or Nay?

@jlrdw I'm not sure if the more efficient than having another tablet just to hold the images.

@drfraker Aw I see, not until you mention the bottleneck, I forget that the laravel collection is much slower than the raw sql performance. I just remember a benchmark talking about how slow it is to manipulate array (mostly map, reduce, read) in code are much slower than in sql

GTHell left a reply on Store Multiple Image Path In One Column Separated By ;? Yay Or Nay?

@cronix I would manipulate the string with all the available php function then update the database.

GTHell left a reply on Store Multiple Image Path In One Column Separated By ;? Yay Or Nay?

I just thought that having another table to hold images will result in slow query when data get bigger.

GTHell started a new conversation Store Multiple Image Path In One Column Separated By ;? Yay Or Nay?

Is it ok? No problem at all with this approach?

06 Nov
1 month ago

GTHell started a new conversation Is Is Possible To Tune VScode To Be Similar/close To PHPStorm?

PHPStorm is the best, Although it offer a lot of powerful tools, it's feel bloated and not joy to use overtime. I like to fire up visual studio code because working in it is much more productive than working with phpstorm. The problems with vscode is it not smart enough. For example --- I want to import Schema from facades but the vscode so clueless that it doesn't know where the heck where the facades Schema is and I need to manually type everything.

05 Nov
1 month ago

GTHell left a reply on How To Generate A Unique But Simple Id For Ticket?

Why are there no standardize way of doing this?

02 Nov
1 month ago
01 Nov
1 month ago

GTHell started a new conversation How To Generate A Unique But Simple Id For Ticket?

The client want the ticket id that is simple in human readable term. Something like timestamp, 12945845 . The things is, I can't use timestamp as the their could be same occurrent. UUID is great but it's too long. Well, I don't want to use ID from the database as it could grow into millions of row.

GTHell left a reply on How Can I Use Jquery From The Webpack Bundler Inside The @push Stack?

This is my header:

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="{{ asset('js/bundle.js') }}" defer></script>
    <link href='https://fonts.googleapis.com/css?family=Josefin Slab' rel='stylesheet'>
    <!-- Font awesome -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
          integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="{{asset('css/bundle.css')}}">
    @stack('header')
</head>

That js/bundle.js is default laravel that include everything from jquery, bootstrap and vue. Inside my webpack.mix.js I have the autoload .autoload({jquery: ['$', 'window.jQuery', "jQuery", "window.$", "jquery", "window.jquery"]}).

As you can see, I load everything in order and I suppose to push to the @stack('header') and make use of jquery but no the console return $ is undefined.

31 Oct
1 month ago

GTHell started a new conversation How Can I Use Jquery From The Webpack Bundler Inside The @push Stack?

I have everything (Bootstrap, jQuery, ....) in the header script. And below that, I have a @stack('header') . In my home page, I push a script but whenever I refer to jquery, it will not detect it. How can I solve this problem?

29 Oct
1 month ago
27 Oct
1 month ago

GTHell started a new conversation What Are Some Good Backend Only CMS?

I hate CRUD.

25 Oct
1 month ago

GTHell left a reply on How To Remove API Throttling?

@s4muel Thank for the help but I have another question. When I said that it's only local service I do mean that only that one specific API because it's under Auth that only local user can do unlimited access. How do I only remove rate_limit from that specific route only?

24 Oct
1 month ago

GTHell started a new conversation How To Remove API Throttling?

I have pagination route in the API.php and you know, the user keep clicking next next and then get throttling errors. How can I avoid that. It's local service so I don't care much about DDOS.

23 Oct
1 month ago

GTHell left a reply on Vue Set Object Doesn't Trigger Reactivity

Use Vue.set for new property reactivity to be trigger.

GTHell left a reply on How Can I Get Username Who Has Same Project With User Logged In

What about you query for a project with that login user id then query all related user from that project you've just queried.

GTHell started a new conversation How To Efficiently Check For Holiday In Laravel?

I just realize that I don't know how to implement a logic that involve checking for holiday. I don't think it's good to query the holiday table and then loop through collection with if statement to check if the the current transaction is in the holiday day. If it's the only option then I have nothing against it but I don't think so.

I prefer something like the array manipulation of Javascript indexOf()

GTHell left a reply on Is Laravel Passport Easier To Implement Than The Tymondesigns/jwt?

If they're the same then the passport probably a winner right. Passport has a better laravel document and support than the tymon/jwt.

22 Oct
1 month ago

GTHell started a new conversation Is Laravel Passport Easier To Implement Than The Tymondesigns/jwt?

Never implement passport before but tymondesigns/jwt.

21 Oct
1 month ago

GTHell started a new conversation Is Docker Good For A Real Time System?

I need a 1:1 performance for my app and wan to use Docker to contain my app for better deployment on server.

19 Oct
1 month ago

GTHell started a new conversation Is It Efficient Just To Run Express Server Just For Real Time?

I'm on 5$ / month vultr VPS. I want to build a real time app with socket.io, redis and laravel. I want to build the real time server from scratch and not using pusher, pub-nub or firebase ..etc. The thing is, integrate socket.io server into Laravel wasn't easy but it's easier to just integrate socket.io into express. Is it the same thing just different implementation?

14 Oct
1 month ago

GTHell started a new conversation How To Make Photo Browser Like Wordpress But With Directory

On wordpress there is a browser for media. I've done that but as the file grow a lot, there will be a huge list of image.

11 Oct
2 months ago

GTHell left a reply on What To Clear After Doing Git Pull On Server?

@skoobi But that would be require user to do it manually which is bad.

@ohffs I'm using git pull button on plesk and yeah, I'm tired of ssh into server to manually do all the work. I'll try to create bash script and find a way to bind git pull button on plesk with the script. Anyway, what about front end that need to clear cache?

GTHell started a new conversation What To Clear After Doing Git Pull On Server?

After git pull, the page is still cached. So there're many thing to do to clear everything but I'm not sure. I'm running on Plesk + cloudflare + gitlab.

The thing I need to do to clear all cache is:

  • purge cache on Cloudflare
  • php artisan config:cache
  • php artisan config:clear ... etc

It's a lot and I don't know which command that truly clear the cache. I'm growing tired and need way to automatically refresh the every time I do git pull on server.

10 Oct
2 months ago

GTHell started a new conversation How To Server Side Rendering The Easy Way?

I want to integrate SSR into the website I'm building because the Js file start showing size and the speed start to decrease. I need some sort of SSR mechanism but also easier to implement. Not the article you found on Google. That one, I don't want to deal with.

04 Oct
2 months ago

GTHell started a new conversation Is Having A Each Script In Laravel Blade Good For SEO?

I like to @push('footer') script into footer in some of the laravel page because it feel like Vue but in PHP. Is there a problem to that?