GTHell

Experience

8,400

0 Best Reply Awards

  • Member Since 1 Year Ago
  • 9 Lessons Completed
  • 0 Favorites

23rd October, 2018

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

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

22nd October, 2018

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

Never implement passport before but tymondesigns/jwt.

21st October, 2018

GTHell started a new conversation Is Docker Good For A Real Time System? • 2 days ago

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

19th October, 2018

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

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?

14th October, 2018

GTHell started a new conversation How To Make Photo Browser Like Wordpress But With Directory • 1 week ago

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.

11th October, 2018

GTHell left a reply on What To Clear After Doing Git Pull On Server? • 1 week ago

@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? • 1 week ago

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.

10th October, 2018

GTHell started a new conversation How To Server Side Rendering The Easy Way? • 1 week ago

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.

4th October, 2018

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

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?

2nd October, 2018

GTHell left a reply on Get All Images Inside Public/img? • 2 weeks ago

@Snapey that was a really good one :) the File will always return the full path which is not what I want either.

GTHell started a new conversation Get All Images Inside Public/img? • 3 weeks ago

I want to make image browser for admin and for that to work, I need to get all image in public/img to show up.

How can I get all image from that directory?

29th September, 2018

GTHell left a reply on Tutorial On How To Debug Laravel Like A Pro? • 3 weeks ago

@Sergiu77 dd() everything into console.log() is cool until it return the entire page and have no idea what the log is all about.

@Snapey Can Laravel be update from v5.5 without affecting my code?

@wilk_randall adding that package make me feel that everything bloated. I never put much effort into it.

28th September, 2018

GTHell started a new conversation Tutorial On How To Debug Laravel Like A Pro? • 3 weeks ago

I'm burnt out trying solving a bug because I don't know how to debug it. It was with my mailable class and my ajax form. There's not much I can do beside return back to console.log on frontend. But if it 500 then I'm stuck. I have multiple class and it's hard to keep track of. Without proper errors message, it would take me so many hours just to find out what the problems is.

26th September, 2018

GTHell left a reply on How To Send Attachment From Request To Mail Without First Saving It To Storage? • 3 weeks ago

Someone on the internet said that PHP can't send file in memory using attachData(). They suggest to save to temp folder. Hmm, that's a lot of work.

GTHell left a reply on How To Send Attachment From Request To Mail Without First Saving It To Storage? • 3 weeks ago

How do I send the file exactly?

I've try something like this

public function build()
    {
        $email = $this->from('[email protected]')
            ->view('emails.contact');
        if ($this->input->hasFile('attachments')) {
            $files = $this->input->attachments;
            foreach ($files as $file) {
                $email->attachData($file, $file->getClientOriginalName(), ['mime' => $file->getMimeType()]);
            }
        }
        return $email;
    }

I got the file but it's only 66byte and I can't open it. I also try $file->getRealPath() and the result is error 500.

GTHell started a new conversation How To Send Attachment From Request To Mail Without First Saving It To Storage? • 3 weeks ago

I have a form that need to send the file attachment to other email. The mailable class has something like attach('file_path') which is not what I want. I want the $request->('file') to be send without first saving it to storage.

Thank.

25th September, 2018

GTHell left a reply on How To Simulate Real Hosting? • 4 weeks ago

@rodney.hess Never know that Laravel can be install on Heroku. I've try that before for about 11 months ago. Oh, well, it's on 25-May-2018.

24th September, 2018

GTHell started a new conversation How To Simulate Real Hosting? • 4 weeks ago

It's hard to get the idea of what is slow. Using chrome throttling profile doesn't feel the same as real hosting. I can't test my web app yet because I don't yet hosting plan. I need to test the loading time because I have Vuejs and want to see if I need to implement server side rendering. 60% of the site is Vuejs and vue-router.

GTHell left a reply on Ajax Form Vs Regular Form? • 4 weeks ago

One they submit the form, all the information will send through email to the responsible people. I'm just thinking of having some sort of backup incase something happen. I'm not plan for the UI. Too much work. I use gmail for sending out so I think it's more safe than my own application but still I feel like I need to back all those data up somewhere.

I want database too but that would be 4-5 different tables for storing enquiry. Is there a db design for this though?

GTHell left a reply on Ajax Form Vs Regular Form? • 4 weeks ago

@Snapey I think my frontend is 99% completed with everything from security, validation to UX. It's a bit more work than regular form but it worth the time. Yet I do concern about the user because I know not all of them know the difference between Internet explorer and google chrome. A quick glance into reality, people still use Windows 7 which has a really bad IE by default.

I still have one more problem. I try to decide between logging and database. What do you think is a better choice? The end goal is just to send all the form data to email of each department but I need to reserve data somewhere for a recovery plan or emergency.

GTHell left a reply on Ajax Form Vs Regular Form? • 4 weeks ago

@jlrdw I'm implemented Ajax form. It's a contact form with different subjects. It has Job Hiring, Leasing and General Enquiry. What I've done so far is validate on front-end then verify with recaptcha then send to backend and verify the recaptcha and send the status back to front end. All I have left is validate datas on backend, log/insert to database and send mail. Is this count as big or just another simple form that can get away with ajax?

23rd September, 2018

GTHell left a reply on Ajax Form Vs Regular Form? • 4 weeks ago

@MaverickChan I'm focusing on mobile and I heard that all browser on iPhone are just a reskin of safari webkit. Does safari has problem with it or only IE?

GTHell started a new conversation Ajax Form Vs Regular Form? • 4 weeks ago

I feel like Ajax form is much more better but if so, why not many website adopt it. Is it having disadvantage that I'm not aware of?

GTHell started a new conversation Is HTTP2 Server Push Implementation Work As Ok? • 1 month ago

I saw a bunch of HTTP2 server push on github and want to implement it but I don't know much about its disadvantage. Is it stable and *ok to use?

18th September, 2018

GTHell started a new conversation How Difficult It Is To Integrate Server Side Rendering Into Existing App? • 1 month ago

On a scale from 1 to 10, How difficult could it be to integrate SSR into existing app?

GTHell left a reply on I'm Stuck. How To Handle Vuex Vue-router Logic? • 1 month ago

Ok, so there's no way to handle it without using persistent storage.

GTHell started a new conversation I'm Stuck. How To Handle Vuex Vue-router Logic? • 1 month ago

I have an items page that loaded 8 items and the data fetching with vuex. On load more, I fetch more items from backend. I'm using paginator of laravel so it's easy to track items. Problems is, when I click on item, I will go to detail page of item and when I go back, all the data reset to 8 items because of mounted function dispatch a fetch 8 items action. I think I lost with the flow.

17th September, 2018

GTHell left a reply on Help - Calculate The Time Span In Time Range Between Checkin & Checkout • 1 month ago

@lostdreamer_nl Thank man, the first algorithm work great.

16th September, 2018

GTHell left a reply on Help - Calculate The Time Span In Time Range Between Checkin & Checkout • 1 month ago

@lostdreamer_nl This is gold. I'm interesting in knowing how did you come up with this solution? Also If I were to google, what keywords are essential? I googled this problem but seem to find no answer that related to what I wanted to do even though it probably has done by many. One more question if what if I want to do in minute instead of hours?

GTHell left a reply on Help - Calculate The Time Span In Time Range Between Checkin & Checkout • 1 month ago

I think this problem I'm proposing can only be done by formula. I thought someone has done it before without using too many if-else. I've done it but it's flaw.

GTHell left a reply on Help - Calculate The Time Span In Time Range Between Checkin & Checkout • 1 month ago

Nah, that’s too simple. What if I check in at 21:00 and checkout at 3:00? if-else? There’re multiple cases. If-else is inefficient.

15th September, 2018

GTHell started a new conversation Help - Calculate The Time Span In Time Range Between Checkin & Checkout • 1 month ago

I have a time range of 20:00-8:00 and I want to calculate the time span between checkout and checkin but only count the time that is inside the time range. For example, if I checkin in 2019-09-15 23:00:00 and checkout at 2019-09-16 10:00:00 then the time span is only 9 hours.

Has anyone done something like this before? Seem easy to solve from reading but inevitable without using formula or face a if-else hell.

GTHell left a reply on Should All Items Data Be Load In Vuex? • 1 month ago

@topvillas Ok then I might do the limit 8.

@alishsh Go open a new thread.

14th September, 2018

GTHell started a new conversation Should All Items Data Be Load In Vuex? • 1 month ago

...
$items = Item::all();

return response()->json($items, 200);
...

I have an index page to show all items but will only load a few items with a load more button. Do I need to pre-fetch all items into vuex or neh?

GTHell left a reply on Has Anyone Mix Bootstrap With Vuetify? • 1 month ago

Thank for the suggestion. But I want to build a free panel and all those panel are not free.

GTHell left a reply on Has Anyone Mix Bootstrap With Vuetify? • 1 month ago

@aurawindsurfing I like bootstrap grid system but vuetify offer more out of a box components for building a quick dashboard. Bootstrap responsive is much easier to work with in my experience.

13th September, 2018

GTHell started a new conversation Has Anyone Mix Bootstrap With Vuetify? • 1 month ago

As the title said, Has anyone done this before?

12th September, 2018

GTHell started a new conversation Any Tutorial Article On Product Listing Like ECommerce (Amazon, EBay, Aliexpress...)? • 1 month ago

I have a page listing all items and I have search, sort and browse by letter. I'm implementing it with Vue, Vuex and axios but stuck on basic idea like sorting. I mean I don't know the flow. The basic I can get is list first 10 items than has a load more and the search bar will alter the list of item. Everything is one page and item is a modal.

10th September, 2018

GTHell started a new conversation Can ERP System Be Develop By One Person? • 1 month ago

Is it feasible? I have two options, first, build alone but taking longer time or train/recruit new member to use laravel.

8th September, 2018

GTHell started a new conversation Do I Need Server Side Rendering For A Dynamic Component Vue? • 1 month ago

I like to mix vue with laravel and sometime, some page has a lot vue and the other is completely vue. I wonder in what situation do I need server side rendering?

I used to make website with vue-cli and yeah, the loading time is aweful. Haven't experience the same thing with blade+view yet

GTHell started a new conversation How To Design Table For Tracking Member Reissue/renewal Date Logs? • 1 month ago

So, you have a member who register on 2018-09-01 and has a expiry date on 2018-09-30. On 2018-09-30, the account expired and the customer comeback to pay for a renewal. The goal is I want to have a table for keep tracking the reissue date. If I were to have a reissue_logs table that has column user_id, reissue_date_time, price_paid, ... then this table could easily go over millions record after a years.

I'm sure this kind of thing has done by many and I want to see how you design this. Thank

5th September, 2018

GTHell started a new conversation In Postman, The First Request Always Takes 4x Times? Why? • 1 month ago

I test my API and the first request always around 230-400~ ms while after that request always ~50ms.

How do I debug that? I want it to always be ~50ms. I'm building a checkout function so I need it to be as fast as possible.

It's LAN network, server to cashier computer. The time from server to the cashier computer is about ~0.00002 ms through normal cat6. With the server being ~230ms, that would be pretty slow.

The current record is only ~2 but testing with 1 millions record and eager loading is around ~400ms which is half a second. Not to mention the code to execute the printing invoice that would eat up a few more ms.

I need to pre-optimize this. Thank and sorry English is not my first language

2nd September, 2018

GTHell left a reply on How To Handle Multiple If Conditions? • 1 month ago

@ardnor The third answer is on point. I really don't like too many if but it's seem that I can get away with it reading the stackoverflow's answer as most of the if statement is checking true or false.

@Sergiu17 Yeah, In traditional, too many if is a bad design. But not all of it is the case. This is the first system that I don't think it can avoid too many if condition just like a validation of 50 columns. It's the requirement. You can think of my system as making some sort of legal document for something that need to check so many condition and so many process to complete the transaction.

There're usually a few process in one transaction when speaking of system design but this one the client ask for too many process in just one transaction.

GTHell started a new conversation How To Handle Multiple If Conditions? • 1 month ago

I'm making a system where there are too many condition. I never make something like this so I'm not entirely sure if multiple if clause would be slow down the system.

I analyzed database and cut out a lot if but still there're too many condition. Is it a normal thing?

29th August, 2018

GTHell left a reply on Can Docker Prevent People From Accessing Source Code If I Were To Put Laravel In It? • 1 month ago

I build interface and backend on laravel and just running it on apache locally on a system. Even though it's localhost, I'm still find a way to protect the .env as the it has password to the main sql server. And the sql server is publicly accessible.

To be simple, Laravel is on lan, SQL server is on the same lan and also public.

Anyway, to hide everything-laravel?

28th August, 2018

GTHell left a reply on Can Docker Prevent People From Accessing Source Code If I Were To Put Laravel In It? • 1 month ago

@jlrdw I'm running it locally. Not hosting.

GTHell started a new conversation Can Docker Prevent People From Accessing Source Code If I Were To Put Laravel In It? • 1 month ago

I want to hide my source code and I'm using laravel as a web app but unlike C#/Java desktop application, the source code is wide open. I wonder if docker or other vm can do such a thing?

27th August, 2018

GTHell started a new conversation How Do I Test Speed In Laravel? • 1 month ago

I mean debug the function execution time?

GTHell left a reply on I'm Making A Parking System In Laravel • 1 month ago

Old system is VB.net and it's fail because of huge growing record of SQL. I'm planning to use Redist for caching which will be fine for day to day operation.

The first problem that pop up in my mind is query the relationship table. Well, I might need to find a way to get all the necessary without querying everything.

I analyze and decide to make 3 sub system. One for checkin, one for checkout and one for centralized. The checkin will do the heavy lifting like reading plate number with python and use web protocol to create new temp record in Laravel central server. The checkout system is the most challenging because there're many condition the user want and hence it need to query 3 tables and processing the result and all of this need to be done on central server that running laravel.

I will test it and share the result. If it that bad then maybe I just switch to other language since I wrote most of the logic and schema already.

The thing I'm not familiar with is measuring the speed back and forth from server. eg. From checkin system -> server -> checkin system -> print ticket out. I'm on intranet if that help.

GTHell left a reply on I'm Making A Parking System In Laravel • 1 month ago

@tykus

(or not) why not?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.