skeith22

skeith22

Web Developer at HYBrain Development Corporation

Bacolod City

Member Since 1 Year Ago

Experience Points 22,580
Experience
Level
Lessons Completed 209
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.

08 Nov
1 week ago

skeith22 left a reply on This.$route.query Is Empty On First Load

@D9705996 - it says

"Cannot read property '$route' of undefined"

any other ideas?

Vue.nextTick().then(function () {
    console.log(this.$route.query);
});
05 Nov
1 week ago

skeith22 started a new conversation This.$route.query Is Empty On First Load

I have this url above on first load

http://domain.test/?access_token=value&refresh_token=value&platform=Android&reseller=value&reseller_account=value

and on my vuejs file

mounted() {
    console.log(this.$route.query);
},

its giving me null

but

beforeRouteEnter (to, from, next) {
    let data = {
        accessToken: to.query.access_token,
        refreshToken: to.query.refresh_token,
        reseller: to.query.reseller,
        resellerAccount: to.query.reseller_account
    };
}

does give me values though..

I want to get the value on first load

31 Oct
2 weeks ago

skeith22 started a new conversation Laravel Passport Not Publishing The Migrations After Vendor:publish

php artisan vendor:publish --tag=passport-migrations

does not publish the migrations to database/migrations.

Laravel v5.7.* Passport v7.*

13 Sep
2 months ago

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

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

12 Sep
2 months ago

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

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();
11 Sep
2 months ago

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

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?

14 Jun
5 months ago

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH

@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

@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

@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

@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

13 Jun
5 months ago

skeith22 started a new conversation Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH

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
}
04 Jun
5 months ago

skeith22 left a reply on How To Access Vuex In BeforeRouteEnter

@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

@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

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

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' });
28 May
5 months ago

skeith22 started a new conversation How To Properly Integrate TinyMCE Using Npm Tinymce Package

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>
30 Apr
6 months ago

skeith22 started a new conversation Laravel 5.6 Net::ERR_INCOMPLETE_CHUNKED_ENCODING

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.

21 Apr
6 months ago

skeith22 left a reply on Somethings Wrong With Laravel Auth

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

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

21 Mar
7 months ago

skeith22 left a reply on MSSQL Server (could Not Find Driver)

I having this issue right now

20 Mar
7 months ago

skeith22 started a new conversation Laravel Horizon And Events Are Failing

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

11 Mar
8 months ago

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

@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.

10 Mar
8 months ago

skeith22 left a reply on Axios Request Returns Empty

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

09 Mar
8 months ago

skeith22 started a new conversation Laravel Echo How To Handle Disconnect, Reconnect And Connection

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

skeith22 left a reply on Emit From Component To Component

@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

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
08 Mar
8 months ago

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

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

28 Feb
8 months ago

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

@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

20 Feb
8 months ago

skeith22 started a new conversation Laravel 5.6 And Passport How To Logout?

does anyone know how to logout?

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

07 Feb
9 months ago

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

@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

@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?

21 Jan
9 months ago

skeith22 left a reply on Filter Datebetween Using A Collection

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

18 Jan
9 months ago

skeith22 left a reply on Filter Datebetween Using A Collection

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

08 Jan
10 months ago

skeith22 started a new conversation Filter Datebetween Using A Collection

is it possible to filter a collection using dates?

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

17 Dec
11 months ago

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

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

14 Dec
11 months ago

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

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

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

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

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.

04 Dec
11 months ago

skeith22 started a new conversation Laravel Installer 1.4 Not Compatible With PHP 7.2 Packages

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

use

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

you're welcome

03 Nov
1 year ago

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

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

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.

22 Oct
1 year ago

skeith22 started a new conversation Laravel Horizon Package Needs Pcntl Extension On Windows

Has anyone tried installing the horizon package on windows?

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

18 Oct
1 year ago

skeith22 started a new conversation How To Manually Query The Soft Deleted Data

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

13 Oct
1 year ago

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

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.

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?

02 Oct
1 year ago

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

@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.

01 Oct
1 year ago

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

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)