skeith22

Web Developer at HYBrain Development Corporation

Experience

21,570

0 Best Reply Awards

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

13th September, 2018

skeith22 left a reply on Guzzle HTTP Says Magic Request Methods Require A URI And Optional Options Array • 1 week ago

@martinbean Thank you for the reply, I fixed it already yesterday.

12th September, 2018

skeith22 started a new conversation Guzzle HTTP Says Magic Request Methods Require A URI And Optional Options Array • 1 week ago

Does anyone know how to fix this?

I have this code

$client = new Client();

$client->request('POST', 'https://pbx.skyswitch.com/ns-api/oauth2', [
    'form_params' => [
        'action' => 'read'
    ],
    'headers' => [
        'Authorization' => 'Bearer 57aa62501a7fe0d3b71de5712cdb1998'
    ]
]);

return $client->getBody();

11th September, 2018

skeith22 started a new conversation Laravel Echo Server Needs Root Access For Ssl Cert And Key • 1 week ago

I'm running it locally on my laptop with SSL enabled.

so laravel-echo-server start doesn't work properly since it doesn't have permission on

/etc/ssl/certs

and

/etc/ssl/private

did any tried changing its user group and permissions without having problems?

14th June, 2018

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH • 3 months ago

@NickVahalik it's just weird cause my other sub domains are working with encryption enabled. but anyways thanks for helping :D

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH • 3 months ago

@NickVahalik @Cronix I found out the problem what's causing the HTTPS error. Cloudflare's DNS, I disabled it and everything worked.

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH • 3 months ago

@NickVahalik still no luck

I created another test sub domain it's working fine with a new cert.

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH • 3 months ago

@NickVahalik its not enabled

ssl_session_cache shared:le_nginx_SSL:1m;
ssl_session_timeout 1440m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

I will enable TLSv1.3 and try again.

@Cronix the HTTP is working fine. but HTTPS is not.

it's working fine in test.domain.com it's not in admin.test.domain.com

13th June, 2018

skeith22 started a new conversation Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH • 3 months ago

Digital Ocean

Ubuntu 16.04.04 LTS NGINX 1.14.0 MYSQL 8.0+ PHP 7.2+

I have 2 domains

1. test.domain.com
2. admin.test.domain.com

my test.domain.com is working fine after creating a certification.

Have anyone encountered this before after newly creating a certification?

here is my server block in NGINX

test.domain.com is working fine.

server {
    root "/var/www/beta/latest/public";
    server_name test.domain.com;

    index index.php;

    access_log /var/log/nginx/beta_access_log;
    error_log /var/log/nginx/beta_error_log;

    client_max_body_size 2M;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include /etc/nginx/fastcgi.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/test.domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/test.domain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = test.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name test.domain.com;
    return 404; # managed by Certbot
}

here is for admin.test.domain.com is not working

This site can’t provide a secure connection admin.test.domain.com uses an unsupported protocol. ERR_SSL_VERSION_OR_CIPHER_MISMATCH

server {
    root "/var/www/beta/latest/public";
    server_name admin.test.domain.com;

    index index.php;

    access_log /var/log/nginx/admin.test_access_log;
    error_log /var/log/nginx/admin.test_error_log;

    client_max_body_size 2M;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include /etc/nginx/fastcgi.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }

    # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/admin.test.domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/admin.test.domain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = admin.test.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    server_name admin.test.domain.com;
    listen 80;
    return 404; # managed by Certbot
}

4th June, 2018

skeith22 left a reply on How To Access Vuex In BeforeRouteEnter • 3 months ago

@rin4ik I got it working, but its kinda stupid but who cares.

my app.js file looks like this in case anyone might get this kind of problem

import Vue from 'vue';
import Vuex from 'vuex';
import router from './router';
import App from './views/App';

window.Broadcast = new Vue();

Vue.use(VueRouter);
Vue.use(Vuex);

// Source of Truth
const store = new Vuex.Store({
    state: {
        user: null,
        roles: [],
        permissions: []
    },
    getters: {
        //
    },
    mutations: {
        //
    },
    actions: {
        //
    },
    modules: {
        //
    }
});

window.Store = store;

const app = new Vue({
    el: '#app',
    store,
    components: { 'app': App },
    router
});

skeith22 left a reply on How To Access Vuex In BeforeRouteEnter • 3 months ago

@rin4ik is there another way? cause it seems kinda messy. cause I never do import inside my components. I prefer things globally. cause you could just do

this.$store.state.attribute

inside created(), mounted(), methods, computed and etc inside components.

I'm wondering why its undefined inside route guard methods like routeBeforeEnter.

skeith22 started a new conversation How To Access Vuex In BeforeRouteEnter • 3 months ago

I want to check if someone has permission to enter the router using beforeRouteEnter() method.

does anyone know how to access vuex inside it?

skeith22 left a reply on How To Properly Integrate TinyMCE Using Npm Tinymce Package • 3 months ago

nevermind I got the answer.

if anyone might encounter this problem here is the solution

add this in your bootstrap.js

window.tinymce = require('tinymce');

add this code to your webpack.mix.js

mix.copy('node_modules/tinymce/skins', 'public/js/skins');
mix.copy('node_modules/tinymce/themes', 'public/js/themes');

and somewhere in your vuejs file like mounted()

tinymce.remove();
tinymce.init({ selector: 'textarea' });

28th May, 2018

skeith22 started a new conversation How To Properly Integrate TinyMCE Using Npm Tinymce Package • 3 months ago

I'm getting an error cannot find "/js/themes/modern/theme.js"

all the files that tinymce needs is already in the package included.

how do I tell tinymce to import from the package location instead of looking for it in the public folder

resources/assets/js/bootstrap.js file

/**
 * TinyMCE Plugin
 */
window.tinyMCE = require('tinymce');

create.vue file

<template>
    <div>
        <div class="card">
            <div class="card-header">
                Create New Post
            </div>
            <div class="card-body">
                <form role="form" method="POST" accept-charset="utf-8" accept="image/*" enctype="multipart/form-data">

                    <div class="form-group">
                        <label for="image">Image</label>
                        <input type="file" class="form-control-file" name="image" id="image" accept="image/*">
                    </div>

                    <div class="form-group">
                        <label for="title">Title</label>
                        <input type="text" class="form-control" name="title" id="title" autocomplete="off" maxlength="100" required>
                    </div>

                    <div class="form-group">
                        <label for="body">Body</label>
                        <textarea class="form-control" name="body" id="body" rows="15"></textarea>
                    </div>

                    <a href="/" class="btn btn-secondary btn-sm">Back</a>
                    <button type="submit" class="btn btn-primary btn-sm">Create New Post</button>
                </form>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {

        };
    },

    mounted() {
        tinyMCE.remove('textarea');
        tinyMCE.init({ selector:'textarea' });
    },

    methods: {

    }
}
</script>

30th April, 2018

skeith22 started a new conversation Laravel 5.6 Net::ERR_INCOMPLETE_CHUNKED_ENCODING • 4 months ago

Laravel v.5.6.18 Nginx v1.13.12 PHP v7.2.4 MySQL v5.7.22

Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

I'm pulling only 800+ of data using axios, I don't know why its giving me this error. last few weeks ago this doesn't happen.

21st April, 2018

skeith22 left a reply on Somethings Wrong With Laravel Auth • 5 months ago

Thank you for the reply @Snapey I actually found it after 5 mins of posting this question hahaha I will mark you answer as correct if ever someone will encounter this problem in the future

skeith22 started a new conversation Somethings Wrong With Laravel Auth • 5 months ago

I changed the default settings in auth.php from Users to Admins somehow it still looks for users table.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'databasename.users' doesn't exist (SQL: select count(*) as aggregate from users where email = [email protected])

my Admin.php Model

<?php

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;

class Admin extends Authenticatable
{
    use HasApiTokens, Notifiable;

    /**
     * Admins table.
     *
     * @var string
     */
    protected $table = 'admins';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}

my config/auth.php

21st March, 2018

skeith22 left a reply on MSSQL Server (could Not Find Driver) • 6 months ago

I having this issue right now

20th March, 2018

skeith22 started a new conversation Laravel Horizon And Events Are Failing • 6 months ago

Past Job Hour = 21 Failed Job Past Hour = 21 Status = Active

BROADCAST_DRIVER=redis CACHE_DRIVER=redis SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=redis

Redis Server is working fine.

I'm triggering a TestEvents its all failing I don't know why what's causing it. cause last week ago its all working

11th March, 2018

skeith22 left a reply on Laravel-Echo-Server Installation On Forge With SSL Enabled With The Redis Broadcast Driver And Socket.io • 6 months ago

@ashwinmram have you tried that your redis server is on a different server? so that means you have to proxy your laravel-echo-server to let the main server communicate with your redis server which is located on a different server.

10th March, 2018

skeith22 left a reply on Axios Request Returns Empty • 6 months ago

I'm actually having this issue right now hahaha an hour ago everything was fine. after sleeping boom it return a blank response but Postman returns normally.

Laravel 5.6 lol

9th March, 2018

skeith22 started a new conversation Laravel Echo How To Handle Disconnect, Reconnect And Connection • 6 months ago

guys how do you handle disconnection, re-connection a connection on echo client side?

skeith22 left a reply on Emit From Component To Component • 6 months ago

@tykus THANK YOU. I've been looking for answers for an hour now. why the hell I didn't think of that.

skeith22 started a new conversation Emit From Component To Component • 6 months ago

Does anyone know how to emit from component 1 to component 2?

Both are global components, I'm using vuex in both components.

SCENARIO

Component 1

  • change value of state.VAR
  • then tell component 2 to update

Component 2

  • update myself using state.VAR value because Component 1 said so

8th March, 2018

skeith22 left a reply on Laravel 5.6 And Passport *5.0 How To Logout In The Api? • 6 months ago

@ejdelmonico do you know how to force revoke a token?

28th February, 2018

skeith22 left a reply on Laravel 5.6 And Passport *5.0 How To Logout In The Api? • 6 months ago

@ejdelmonico I actually logged it out by sending an expired cookie to the session cookie, overwriting it. thus giving it the value of expired cookie then refresh the page redirects it to the login page.. its crazy but it works though hahahaha I do not know how to revoke the token from the api routes

20th February, 2018

skeith22 started a new conversation Laravel 5.6 And Passport How To Logout? • 7 months ago

does anyone know how to logout?

I'm posting to a route logout using guard('api') and guard('web')->logout() still no luck.

7th February, 2018

skeith22 left a reply on Can Laravel 5.5 Horizon Use Controller Method Instead Of Closure? • 7 months ago

@bobbybouwmann what I mean is instead of just false could like return redirect? or return a view?

skeith22 left a reply on Php Artisan Route:list Returns Nothing • 7 months ago

@brunog I have this right now v.5.5.34 route:list returns nothings. tried composer dumpautoload, route:clear and route:cache still nothing.

what did you do?

21st January, 2018

skeith22 left a reply on Filter Datebetween Using A Collection • 8 months ago

I've already found an answer on my problem. @suraj_jadhav16 I will try your suggestion and also @burlresearch suggestion.

18th January, 2018

skeith22 left a reply on Filter Datebetween Using A Collection • 8 months ago

I've tried it, it doesn't work on dates

8th January, 2018

skeith22 started a new conversation Filter Datebetween Using A Collection • 8 months ago

is it possible to filter a collection using dates?

like querying a whereBetween on sql but instead you use it on a collection.

17th December, 2017

skeith22 left a reply on Can Laravel 5.5 Horizon Use Controller Method Instead Of Closure? • 9 months ago

@bobbybouwmann I wanted to control where it goes instead of returning false

14th December, 2017

skeith22 started a new conversation Can Laravel 5.5 Horizon Use Controller Method Instead Of Closure? • 9 months ago

I'm having problems handling the Horizon::auth() method in the routes. Can the method use a controller to handle the response?

the current code shows an error when you return false, but when you return true it's normal, it shows the horizon dashboard.

current code

Horizon::auth(function ($request) {
    if (TRUE) {
        return true;
    }

    return false;
});

skeith22 left a reply on Laravel 5.5 Logging Out In Production Cause Change Of Password Value In The Database • 9 months ago

Nevermind I found the answer it was on my Model static updating method

skeith22 left a reply on Laravel 5.5 Logging Out In Production Cause Change Of Password Value In The Database • 9 months ago

This is the code in my logout in the default Auth\LoginController.php

public function logout(Request $request)
{
    $this->guard()->logout();

    $request->session()->invalidate();

    return redirect('/');
}

I was not having this issue before, this thing just pop out of nowhere

skeith22 started a new conversation Laravel 5.5 Logging Out In Production Cause Change Of Password Value In The Database • 9 months ago

Every time I log out in the stage site the password value changes.

--Scenerio

  1. migrate:fresh --seed
  2. Login using default password then logout
  3. Try logging in again. credentials not found.

I looked at the value of the password before logging out, after it logout the value change.

4th December, 2017

skeith22 started a new conversation Laravel Installer 1.4 Not Compatible With PHP 7.2 Packages • 9 months ago

Problem 1 - Conclusion: don't install laravel/installer v1.4.1 - Conclusion: remove symfony/console v4.0.0 - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1]. - Conclusion: don't install symfony/console v4.0.0

composer is spitting out this error hahaha

skeith22 left a reply on Laravel 5.5 & Bootstrap 4 Pagination Issues • 9 months ago

use

{{ $users->links('vendor.pagination.bootstrap-4') }}

you're welcome

3rd November, 2017

skeith22 left a reply on How To Cast Arrays Into Object Dynamically By Using (object) Casting In The Blade Views • 10 months ago

Nevermind guys I just found out you can return it with casting (object)

skeith22 started a new conversation How To Cast Arrays Into Object Dynamically By Using (object) Casting In The Blade Views • 10 months ago

Does anyone know how to cast an array to object dynamically?

I have an array of arrays that I want to cast into object automatically on the blade views.

so it can be an array of objects.

let's just say $users is one

doing

foreach($users as $user) {
    $user = (object) $user;
    echo $user->id;
}

does the trick, but I'm wandering if its possible to do like

foreach($users as (object) $user) {
    $user = (object) $user;
    echo $user->id;
}

ofcourse this causes an error. I wanted to the code above in the blade views

currently I'm doing this because my value is an array. I'm using transform collection method incase you're wandering why it is in array.

@forelse ($users as $user)
{{ $user['id'] }}
@endforeach

I wanted to cast it on object on the blade views, so I can do this instead

@forelse ($users as $user)
{{ $user->id }}
@endforeach 

ofcourse I could just do this

<?php $user = (object) $user ?>

but its quite dirty to look at.

22nd October, 2017

skeith22 started a new conversation Laravel Horizon Package Needs Pcntl Extension On Windows • 11 months ago

Has anyone tried installing the horizon package on windows?

does this parameter work? --ignore-platform-reqs

18th October, 2017

skeith22 started a new conversation How To Manually Query The Soft Deleted Data • 11 months ago

The model is using SoftDeletes trait.

Does anyone know how to manually query the deleted files?

I wanted to query the deleted data without using the withTrashed() or onlyTrashed() functions

13th October, 2017

skeith22 left a reply on How To Override The Functionality Of A Certain Core Class. • 11 months ago

Hi @Screenbeetle,

Yes2 I'm aware of how to override methods. The method is not in the trait which is I don't know how they trigger it, as of the moment I literally commented out the core code, and wrote my own logic on it hahahah IT A REALLY BAD IDEA, though it works like magic hahahahaha.

skeith22 started a new conversation How To Override The Functionality Of A Certain Core Class. • 11 months ago

Does anyone know how to override this without actually touching the core file itself

vendor\laravel\framework\src\Illuminate\Auth\Notifications\ResetPassword.php

line 39-51

/**
 * Build the mail representation of the notification.
 *
 * @param  mixed  $notifiable
 * @return \Illuminate\Notifications\Messages\MailMessage
 */
public function toMail($notifiable)
{
    return (new MailMessage)
        ->line('You are receiving this email because we received a password reset request for 
        your account.')
        ->action('Reset Password', url(config('app.url').route('password.reset', $this->token, 
        false)))
        ->line('If you did not request a password reset, no further action is required.');
}

cause I have a sub-domain that also uses password reset functionality, and I also change the default names of Auth:routes().

so the password.reset is now show-reset-form.

anyone have an idea?

skeith22 left a reply on Laravel New App-name Curl Error 6. This Should Not Happen. • 11 months ago

@ChristophHarms Thanks for the reply man! :D

2nd October, 2017

skeith22 left a reply on Laravel New App-name Curl Error 6. This Should Not Happen. • 11 months ago

@Yamen hi yamen, I turned off the internet intentionally to test if the installer would run without internet. it should work without internet. it should cause that's what it does before. it should just load it from cache.

and I know it checks for the latest live versions, but then again it should just load the cache if there is no internet but instead it spits out error, that's the purpose of the installer to install the latest cache if there is not internet.

1st October, 2017

skeith22 started a new conversation Laravel New App-name Curl Error 6 When No Internet Connection. • 11 months ago

laravel installer version is 1.4

I'm getting an error when using the laravel new command

cURL error 6: Could not resolve host: cabinet.laravel.com (see 
http://curl.haxx.se/libcurl/c/libcurl-errors.html)

22nd August, 2017

skeith22 started a new conversation Apache2 Cannot Remove Index.php In Mozilla Firefox Even With Mod_rewrite Enabled • 1 year ago

does anyone how to fix this error? I have enabled the mod_rewrite in apache2 and added AllowOverride All in my vhost.

it works normally on Google Chrome but Mozilla Firefox doesn't remove the index.php

4th August, 2017

skeith22 left a reply on Where Between In Query Builder Using Date Values Is Not Working As Expected. • 1 year ago

Nevermind guys I found the answer I just needed to add

->toDateTimeString():

skeith22 started a new conversation Where Between In Query Builder Is Not Working As Expected. • 1 year ago

I'm trying to get the data between 2 dates.

and this code returns 0 results

return Model::whereBetween('created_at', [$this->carbon->startOfWeek(), $this->carbon->endOfWeek()])->get();

this is the query statement it creates when I use toSql();

select * table where created_at between ? and ?

but this query works

return $this->appointment->whereRaw('`created_at` between "' . $this->carbon->startOfWeek() . '" and "' . $this->carbon->endOfWeek() . '"')->get();

I don't get why the first one doesn't work but doing whereRaw works but they have the same query statement.

is this a bug?

Edit Your Profile
Update

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