app\main\controllers\WelcomeController::trySampleForms PHP Method

trySampleForms() public method

GET | Redirect the user if the 'users' table is empty or not then redirect it to either login or registration.
public trySampleForms ( ) : mixed
return mixed
    public function trySampleForms()
    {
        if (User::count()) {
            return redirect()->to(route('showLoginForm'))->withInfo(lang()->get('responses/login.pre_flash_message'));
        }
        return redirect()->to(route('showRegistrationForm'))->withInfo(lang()->get('responses/register.pre_flash_message'));
    }