GTHell

Experience

5,880

0 Best Reply Awards

  • Member Since 9 Months Ago
  • 8 Lessons Completed
  • 0 Favorites

21st June, 2018

GTHell left a reply on Multiple Pivot Table Or One Pivot Table With Multiple Columns? • 1 day ago

@shez1983 I just made one table with all the field as true or false. How do you come up with naming those pivot table?

GTHell started a new conversation What Auth Middleware To Use When Doing Ajax From Authenticated User? • 1 day ago

currently, In my api.php I have a route for ajax but I didn't give it any middleware. The user will redirect to the login page on any link that require ajax. I'm curious what middleware to use in this case?

I've try auth and auth:api in the route and it both not work.

GTHell started a new conversation Multiple Pivot Table Or One Pivot Table With Multiple Columns? • 2 days ago

What is better when designing a many-to-many relation? For instance, I have a table users has relationship with projects table and the column that has many to many are like, add_to_watchlist, and transaction. I wonder if I should store this three in one pivot table or separate them all?

GTHell left a reply on Payment Gateway That's Not Stripe Or Braintree? [Closed] • 2 days ago

@Sergiu17 I just research more on this and it's seem that non of the method will available for my country but local bank. And local bank require company to register and has transaction for over 6 month. Now I know why startup in the US is much much more easier.

20th June, 2018

GTHell started a new conversation Payment Gateway That's Not Stripe Or Braintree? • 3 days ago

Stripe is not support in my country.

19th June, 2018

GTHell left a reply on Redirect The Previous Link After Login? • 3 days ago

@grenadecx that's what I'm going to do if I can't get answer to my original problem. I'm just not sure why this happen and what is the different doing it manually vs redirect()->intended().

GTHell left a reply on Can't Seem To Get My Jquery Node_module Loaded In App.js • 3 days ago

You can try putting it inside body tag instead of head tag.

GTHell left a reply on What For Is Default App.js And Bootstrap.js? • 3 days ago

I like to think that static library like axios or jquery that use through all the app should only require one and bootstrap is a great place for them. Something that is more dynamic like Vue.js or React.js should be extend and create yourself.

GTHell left a reply on Redirect The Previous Link After Login? • 3 days ago

I have setup 2 auth. One is original user Auth and another is Admin auth. I didn't touch the Login controller so the redirect()->intended('dashboard') is left untouch. It seem to work on fresh install though but my project is way to far to redo.

Here's the code that I customize: App\Exceptions\Handler.php

....
/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Exception $exception
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $exception)
    {
        if ($exception instanceof AuthenticationException) {
            $guard = array_get($exception->guards(), 0);

            switch ($guard) {
                case "admin":
                    return redirect((route('admin.login')));
                    break;
                default:
                    return redirect((route('login')));
                    break;
            }
        }

        return parent::render($request, $exception);
    }
.....

LoginController.php (Left un-touch)

class LoginController extends Controller
{
    /*
    |--------------------------------------------------------------------------
    | Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles authenticating users for the application and
    | redirecting them to your home screen. The controller uses a trait
    | to conveniently provide its functionality to your applications.
    |
    */

    use AuthenticatesUsers;

    /**
     * Where to redirect users after login.
     *
     * @var string
     */
    protected $redirectTo = '/dashboard';

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest')->except('logout');
    }
}

GTHell started a new conversation Redirect The Previous Link After Login? • 3 days ago

I can get it work passing some parameter but is there a standard way?

14th June, 2018

GTHell left a reply on Pivot Table Only Return User_id & Project_id • 1 week ago

@tykus It's catcha situation when I skim through the document.

It return all the project that association.

GTHell started a new conversation Pivot Table Only Return User_id & Project_id • 1 week ago

I have user that can has many projects and vice versa. I have table call user_project with a few column but when query using eloquent $user->projects->find(1)->pivot I only get user_id and project_id. Where is the rest of the column?

11th June, 2018

GTHell started a new conversation What Are The Best Way To Mix Front End Static Content To Dynamic Backend? • 1 week ago

I have this project where every single page is inconsistent that the front-end guy need to enter it manually. The page requires to have some functionality like user add to watchlist and more.

I'm thinking of putting the id of project into those button. The same concept as using @foreach but there might be a better way, isn't it?

GTHell left a reply on If SPA Is A Thing Why Not Many Website Migrating To It? • 1 week ago

Isn't server side rendering there to solve that problem?

9th June, 2018

GTHell left a reply on If SPA Is A Thing Why Not Many Website Migrating To It? • 1 week ago

@CJJ Reddit is moving to React slowly over these months and now their platform is React only. I don't see why Amazon or other platform can't do the same.

@martinbean Why is everyone so hype with SPA like Vue or Reactjs? It take me 2-3x times to build something that can be done faster with static page but the benefit is also that I can build frontend functionality 5x times faster than static page with jQuery.

8th June, 2018

GTHell started a new conversation If SPA Is A Thing Why Not Many Website Migrating To It? • 2 weeks ago

Assume that they have resource and good engineer, why won't they migrate to SPA? I'm building a shopping ecommerce with SPA and I just don't see any popular ecommerce website has SPA. Why?

7th June, 2018

GTHell started a new conversation How To Tell To User That My Website Is Base On Laravel? • 2 weeks ago

I'm building a backend portfolio and I have a VPS so I have infinite sub-domain. I want to show off my technology but I don't want to screenshot. Is there something like PHPInfo() ?

3rd June, 2018

GTHell left a reply on What Is Api Auth Work Best For When, Token Based, JWT, Passport? • 2 weeks ago

@Sys32 People saying that setup the laravel passport is tedious. I use JWT and it's quiet easy and I'm trying to run OAuth server. Does passport still better than the rest of the other packages?

1st June, 2018

GTHell started a new conversation What Is Api Auth Work Best For When, Token Based, JWT, Passport? • 3 weeks ago

I use JWT but well, I'm kinda new to other thing like passport.

31st May, 2018

GTHell started a new conversation What Are Some Open Source Packages For ECommerce? • 3 weeks ago

Can you build eCommerce site with open source package for free? (exclude payment gateway)

29th May, 2018

GTHell started a new conversation How To Receive FormData In Laravel From Axios? • 3 weeks ago

On frontend I have an input field that take image file and I want to post that to my api controller. The thing is I don't know how to receive the FormData object from the axios.

28th May, 2018

GTHell started a new conversation When To Use Vue Router And When Not To? • 3 weeks ago

For example I have a login form/register form. Should I just switch component between login/register or using a route? Generally speaking, when to use route beside switch to detail page?

GTHell started a new conversation Laravel + Vue For A ECommerce? • 3 weeks ago

I'm undertaking another project that's eCommerce but the contract also including scale the application overtime. The customer want to add the machine learning at the end of the project which will take year but for starting, it's just a simple eCommerce. I know React+Spring is probably the best choice but my skill is not there yet. Is Laravel + Vue also suitable?

The scalability will come in the next 5-6 years. For now, I'm only building basic eCommerce function.

Sorry, English is not my first language.

25th May, 2018

GTHell left a reply on How To Integrate CKEditor Into Laravel With Laravel Mix? • 4 weeks ago

Spend hours try to find what best editor for laravel and still end up with CKEditor4. I use @stack and push the CDN to its stack so I only include the the CDN on specific page that require it.

GTHell left a reply on Do I Need Vue Router At All? • 4 weeks ago

@Snapey Additional question, Can I do the same thing with Reactjs?

GTHell started a new conversation Do I Need Vue Router At All? • 4 weeks ago

I extend the default view that has to be the admin page. Now I can use specific component anywhere I want like binding the input form which is useful. My purpose is to use vue only where I want like registering user or anything that is dynamic because I want to replace jQuery entirely. Do you think it's good to use component on where it's only need?

This is the first time I use vue in a live project and this is not tutorial project.

Sorry, English is not my first language.

24th May, 2018

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 4 weeks ago

For now, can anyone tell me how to implement the function I want? I don't care if it use intended() or to() because all I want is the user to go to the right link after he/she authenticated.

Example:

  1. User stay on '/'
  2. User want to go to '/dashboard/profile'
  3. User redirect to login because 'dashboard/profile' is part of the authentication
  4. But User go to the '/dashboard' instead of '/dashboard/profile'

Can anyone help?

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 4 weeks ago

Dashboard is the default route of the intended(route(‘dashboard’) method. The place I want to go is dashboard/profile so the user need to login first but after the login the user redirect to /dashboard route instead of /dashboard/profile which is the intended route user want to go.

GTHell started a new conversation How To Integrate CKEditor Into Laravel With Laravel Mix? • 4 weeks ago

The CKEditor 4 depend on a lot of plugin and I don't think I can just add all of that to webpack.mix.js.

Is there anyway to use CKEDITOR without putting it in public directory? I want to use webpack.

23rd May, 2018

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 4 weeks ago

@Snapey The user end up at login page because the UserController implement an auth middleware.

22nd May, 2018

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 1 month ago

@Snapey I see but that is less important than the OP problem. I want to user to redirect to the right place after login and intended() not working.

GTHell left a reply on How To Make A Payment Beside Using Stripe Or Braintree? • 1 month ago

@gcwilliams @N3 I'm new to this and can you recommend me the best gateway one beside stripe? Or is there no free payment gateway?

GTHell started a new conversation How To Make A Payment Beside Using Stripe Or Braintree? • 1 month ago

I'm making an app for a company that involve transaction to register. Beside using stripe, is there is alternative? Or storing card information is a bad method?

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 1 month ago

@biishmar What @Snapey said.

@Snapey That suppose to work with route()->intended() but I don't know why it keep going to the default route of route()->intended(route('default')).

Here is the snippet in my AdminLoginController

        ......
        if(Auth::guard('admin')->attempt($credential, $remember)){
            // if success then redirect to intended or go to admin dashboard
            return redirect()->intended(route('admin.dashboard'));
        }
        .....

And here is the change I made to RedirectIfAuthenticated middleware:

public function handle($request, Closure $next, $guard = null)
    {
        if (Auth::guard($guard)->check()) {
            switch ($guard) {
                case 'admin':
                    return redirect()->intended(route('admin.dashboard'));
                    break;
                default:
                    return redirect()->intended(route('home'));
                    break;
            }
        }

        return $next($request);
    }

GTHell left a reply on One Backend With Multiple Frontend? • 1 month ago

@ejdelmonico Why Laravel aren't capable of high volume API? What make Lumen so different?

GTHell left a reply on Redirect()->intended('default') Is Not Working As Expected? • 1 month ago

@biishmar That's the same as redirect('route-name') and profile page is static as it's suppose to be intended route.

21st May, 2018

GTHell started a new conversation Redirect()->intended('default') Is Not Working As Expected? • 1 month ago

I have an AdminLoginController that after the attempted login it should redirect the user to intended location for example '/admin/profile' but it keep going to the default route of intended method.

10th May, 2018

GTHell started a new conversation One Backend With Multiple Frontend? • 1 month ago

Is it good to have one backend to have different api for multiple different frontend website? I just told the frontend dev to do in whatever he want whether it's just PHP, CSS or JS.

4th May, 2018

GTHell started a new conversation What Are Some Design Pattern I Need To Know As A Developer? • 1 month ago

When I first start to customize the Auth scaffolding I was held back because of the abstraction. What are some design pattern I should know as a backend developer?

26th April, 2018

GTHell started a new conversation How To Really Apply SOLID Principle? • 1 month ago

The make:auth scaffolding from artisan command has a really nice structure and I found myself to want my project to be organize like that but seem not able to really apply the solid principle to it.

25th April, 2018

GTHell left a reply on How To Separate Frontend And Backend Completely? • 1 month ago

I know react and react-router but making a site in react can sometime take more time then it is intended. There is a library call Sammy.js for frontend routing but I want to make thing as small as possible for the front end. I just think that there might be alternative to react or angular and vuejs.

Component base and the good stuff available in those framework are great but for a smaller website that would need only simple api call to the backend is a bit overkill.

Thank for your suggestion. Seem like I can't escape from react at all.

24th April, 2018

GTHell started a new conversation How To Separate Frontend And Backend Completely? • 1 month ago

I want frontend to only fetch api from backend using one of the js library like axios or superagent. I can't seem to understand how can one make a route without having backend?

20th March, 2018

GTHell started a new conversation Is Having Ads On Your Web Hard To Implement? • 3 months ago

Another customer offer me a project that involve simple CRUD but the customer want to have Ads revenues and I never done any Ads, SEO or money things before.

Is it hard to do this kind of thing?

14th March, 2018

GTHell started a new conversation Can You Give Me A Scope Of Credit Card Payment? • 3 months ago

How difficult would it be to have an online payment with Credit card?

13th March, 2018

GTHell started a new conversation Can Laravel Php Be Easily Interact With Hardware Like Fingerscan, Invoice Printer ...etc? • 3 months ago

I want to use Laravel as Backend for a system that has checkin process and also registering users. The user can get through access door by finger scanning. The old system and hardware already exist but broken and I don't think I can propose them a new hardware since all the fingerprint hardware is still function well. Also, the system will include invoice printing, listen for the trigger of a button ...etc

Well, The concern is, how well laravel can be integrate with all these hardware. I've google and learn that there are a lot of library that handle all of this. Is there a bridge between C#/Java -> PHP?

The purpose of me wanting to use laravel because this project is fit best using Web application. Since there'll be a pusher notification to the smart phone and secure database on the cloud, I think Laravel is the way to go for me. I could've go with Java but I don't know Spring MVC.

GTHell started a new conversation Project Errors When Switching From React.js To Vue.js ? • 3 months ago

I set the project to React.js since the first initialize but now want to use Vue.js because I'm more confident with it and it's also easy to code. I think the problem is with php artisan preset command that overwrite my code. What if I want to do it manually, what file do I need to change?

9th March, 2018

GTHell started a new conversation How Do You Set Deadline Of A Project? • 3 months ago

What to think first when it come to set a deadline for a project.

GTHell left a reply on How The Concept Of Mail Verification Work In Laravel? • 3 months ago

I thought the first commenter is different from the second one but anyway I already figure it out by doing something similar to what you suggest.

8th March, 2018

GTHell started a new conversation How The Concept Of Mail Verification Work In Laravel? • 3 months ago

I don't want to use package or use auth scaffolding. My app can send mail already and I already has a view for mail verification but what happen when the user click on the Click here to complete your registration link?

5th March, 2018

GTHell started a new conversation Is Laravel Suitable For System Like Management System Or Similar System? • 3 months ago

I want to take a project that involve managing membership of a gym. Its function include registration, promotion management, Expiry date ....etc. The only thing I'm concern is integrate it with Finger print and report as I never done any report using Laravel nor research about it.

Edit Your Profile
Update

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