skeith22

skeith22

Member Since 2 Years Ago

Bacolod City

Senior Software Engineer at Skywitch

Experience Points 34,790
Experience Level 7

210 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 322
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

23 Aug
3 weeks ago

skeith22 left a reply on Does The Built-in Token On Laravel (api_token) Expires?

thanks for the reply. nice to know it doesn't expire.

21 Aug
3 weeks ago

skeith22 started a new conversation Does The Built-in Token On Laravel (api_token) Expires?

Does anyone know if the API Authentication token built-in in Laravel expires?

for example, if you log in then you get a new token using hashing, does the token expire?

17 Aug
4 weeks ago

skeith22 left a reply on Can You Implement Passport For 2 Auth Guards?

That one is tampering with the packages files which is a pain when deploying. I prefer something without touching the package files.

16 Aug
1 month ago

skeith22 started a new conversation Can You Implement Passport For 2 Auth Guards?

I have an Admin guard and User guard, would it be possible to implement Passport on both guards?

11 Aug
1 month ago

skeith22 left a reply on Method Checker On Models If Seeding Command Is Running.

apparently, the factoryWithoutObservers() helper doesn't exist though. Where did you find it?

09 Aug
1 month ago

skeith22 left a reply on Pass Parameters To GET Request In Fetch API

looks like it works properly.

skeith22 left a reply on Pass Parameters To GET Request In Fetch API

I was actually looking for a way to convert Object to query string parameters.

skeith22 started a new conversation Pass Parameters To GET Request In Fetch API

does anyone know how to pass parameters in a GET request using fetch()?

p.s. I can't use Axios inside the web worker.

08 Aug
1 month ago

skeith22 started a new conversation Pass Instance To Vue-worker?

Does anyone know how to pass the instance to the vue-worker?

or does anyone know how to properly implement a web worker on vue?

skeith22 left a reply on Method Checker On Models If Seeding Command Is Running.

@click I miss spelled that one lol. @aurawindsurfing I'll try your solution.

06 Aug
1 month ago

skeith22 left a reply on Method Checker On Models If Seeding Command Is Running.

hey click, I have a function on the creating event on the public static function boot of the Models. I don't want the creating event being event being triggered if the seeding command is running.

like this one

/**
 * Run functions on boot.
 *
 */
public static function boot()
{
    parent::boot();

    static::creating(function ($model) {
        // If seeding command is running RETURN

        // Otherwise do something
    });
}

skeith22 left a reply on Method Checker On Models If Seeding Command Is Running.

hey, thanks for the reply but what I mean is a METHOD checker on Models if the seeding command is running. Not if the Model seeder file exists.

skeith22 started a new conversation Method Checker On Models If Seeding Command Is Running.

Does anyone know how to check on the public static function root method of a Model if the seeding command is running?

Do the Models have a built-in function or method checker if seeders are running?

05 Aug
1 month ago

skeith22 left a reply on How To Setup Service Worker

do you know how to pass an AJAX Request to a Service Worker from VueJS? or like let the service worker do the AJAX Request and access the data FROM VueJS Instance.

01 Aug
1 month ago

skeith22 left a reply on Broadcasting Using Redis Driver Has A Channel Naming Issue Since V5.8

If you're only going to run a single Laravel application on a single server then commenting out the prefix would help too

config/database.php file

'options' => [
    'cluster' => env('REDIS_CLUSTER', 'predis'),
    // 'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
    'prefix' => '',
],

This is the log on the Laravel Echo Server when you fire the event TestEvent

Channel: test-channel
Event: App\Events\TestEvent

then on your application js file.

Echo.channel('test-channel').listen('TestEvent', (event) => {
    console.log(event);
});

This works as well

31 Jul
1 month ago

skeith22 started a new conversation Broadcasting Using Redis Driver Has A Channel Naming Issue Since V5.8

For those who are using Redis as their broadcasting driver, you will have an issue trying to receive the broadcasted events if you are using the channel name normally on your Echo channel listeners.

Since Laravel 5.8 there were changes on the config/database.php on Redis configuration that was not written on the website documentation regarding broadcasting events using Redis.

IF you don't fully specify the channel name including the database prefix you won't receive the broadcasted events.

this is what you should do for those who are having issues.

config/database.php file

// Take note of the prefix
'options' => [
    'cluster' => env('REDIS_CLUSTER', 'predis'),
    'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
],

so if you're APP_NAME is example "DOMAIN"

APP_NAME=DOMAIN

then your event file example TestEvent

/**
 * Get the channels the event should broadcast on.
 *
 * @return \Illuminate\Broadcasting\Channel|array
 */
public function broadcastOn()
{
    return new Channel('test-channel');
}

This is the log on the Laravel Echo Server when you fire the event TestEvent

Channel: DOMAIN_database_test-channel
Event: App\Events\TestEvent

then on your application js file.

Echo.channel('DOMAIN_database_test-channel').listen('TestEvent', (event) => {
    console.log(event);
});

It looks clunky and dirty though but you should be able to receive the broadcasted event.

They should fix the Laravel Echo package to automatically remove the "DOMAIN_database_" prefix so that you can use the channel name normally like

Echo.channel('test-channel').listen('TestEvent', (event) => {
    console.log(event);
});

Is it possible to intercept the Event on the Echo before it passes it on the channel function?

@TaylorOtwell @JeffreyWay

30 Jul
1 month ago

skeith22 started a new conversation Laravel PDF Editor

Does anyone know a package that could write to PDF files?

I have a template PDF file, the goal is to write on that PDF and save it as another file.

skeith22 left a reply on How To Setup Service Worker

@bobbybouwmann how do I add the compiled js files on the service worker? I'm using a dynamic import on my js files I wanted to add them dynamically on the cached files.

27 Jul
1 month ago

skeith22 left a reply on Mix V4 Outputs Blank App.css File

oh I forgot to mention it. that I have a workaround for it as of the moment while waiting for webpack5. its on the laravel mix github issues tab.

skeith22 left a reply on Mix V4 Outputs Blank App.css File

just retested again with

node v12.7.0
npm v6.10.2

package.json file

"devDependencies": {
    "axios": "^0.19",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "bootstrap": "^4.1.0",
    "cross-env": "^5.1",
    "jquery": "^3.2",
    "laravel-mix": "^4.0.7",
    "lodash": "^4.17.5",
    "popper.js": "^1.12",
    "resolve-url-loader": "^2.3.1",
    "sass": "^1.15.2",
    "sass-loader": "^7.1.0",
    "vue": "^2.5.17",
    "vue-router": "^3.0.7",
    "vue-template-compiler": "^2.6.10",
    "vuex": "^3.1.1"
}

app.js file

import App from './views/layouts/App';
import router from './router';

// Layouts
Vue.component('navbar', require('./views/layouts/Navbar.vue').default);
Vue.component('sidebar', require('./views/layouts/Sidebar.vue').default);

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

router.js file

import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const Home = () => import('./views/Home');

const router = new Router({
  mode: 'history',
  routes: [
    { path: '/', name: 'home', component: Home }
  ]
});

export default router;

webpack.mix.js

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .sourceMaps()
    .extract([
        'vue'
    ]);

if (mix.inProduction()) {
    mix.version();
}

mix.disableNotifications();

SAME RESULTS blank app.css file

@JeffreyWay

26 Jul
1 month ago

skeith22 left a reply on Laravel 6

hooray for SemVer <3

25 Jul
1 month ago

skeith22 left a reply on Git Pull Request From Local Branch

I've already done this. I'm getting an error

not a valid revision

this is the command

git request-pull <my-repo> <my-branch>:<original-repo> <master branch>

skeith22 left a reply on Git Pull Request From Local Branch

All I can do it clone the repository directly.

that's what I did then I created my own branch and changed something there, git add and commit that's it.

skeith22 left a reply on Git Pull Request From Local Branch

Bitbucket doesn't have a fork button that's the fun part.

skeith22 started a new conversation How To Setup Service Worker

Does anyone know how to set up a service worker on Vue? how would handle the axios requests

skeith22 started a new conversation Git Pull Request From Local Branch

Does anyone know how to create a pull request from a local branch to an online repository?

I have no write access but only read access to the Bitbucket repository btw.

14 Jul
2 months ago

skeith22 left a reply on Laravel Guzzle CURL Error 6: Could Not Resolve Host: Http (see Http://curl.haxx.se/libcurl/c/libcurl-errors.html)

just add the server IP just like on your windows host file.

ssh on your server and run this command on your server

homestead or ubuntu server

sudo nano /etc/hosts

on windows edit the host file *note you need to open the text editor as administrator

C:\Windows\System32\drivers\etc

on your host file write this *192.168.10.10 is your server address. your server IP may be different

192.168.10.10    project.test
192.168.10.10    project2.test
192.168.10.10    project3.test

or

127.0.0.1    project.test
127.0.0.1    project2.test
127.0.0.1    project3.test
13 Jul
2 months ago

skeith22 left a reply on Mix V4 Outputs Blank App.css File

it seems that .extract(['vue']) is causing app.css output to be blank. but not sure.

skeith22 started a new conversation Mix V4 Outputs Blank App.css File

I have a fresh installation of Laravel 5.8

node v10.15.3
npm v6.10.1

I have this webpack.mix.js config

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .sourceMaps()
    .extract([
        'vue'
    ]);

if (mix.inProduction()) {
    mix.version();
}

mix.disableNotifications();

this normally works on Laravel Mix v2.*

the js files are being compiled normally but the app.css file is blank

skeith22 left a reply on MySQL Database #mysql50#lost+found

I just updated Vagrant, Laravel/Homestead Box and Homestead. still there lol

Vagrant v2.2.5 Homestead v9.0.3 Laravel/Homestead Box v8.0.0

03 Jul
2 months ago

skeith22 started a new conversation Homestead.yaml Mongodb: True Not Installing Mongo Database

has anyone tried installing mongodb lately using the Homestead.yaml file?

mine is not installing the mongodb at all

27 May
3 months ago

skeith22 left a reply on MySQL Database #mysql50#lost+found

@KITESURF - it was not there before, I got this after upgrading my Homestead and Vagrant Box.

22 May
3 months ago

skeith22 left a reply on MySQL Database #mysql50#lost+found

@DEVFREY - I tried using phpmyadmin and mysql workbench, both can't delete the database. it says it doesn't exist.

skeith22 left a reply on MySQL Database #mysql50#lost+found

@DEVFREY - it's not an error, it's a database that can't be deleted or used but it's on the list of databases.

skeith22 left a reply on MySQL Database #mysql50#lost+found

just the default installed v5.7.26

skeith22 started a new conversation MySQL Database #mysql50#lost+found

Has anyone have this schema/database before on their fresh homestead VM installation?

Homestead v8.4.0

Laravel/Homestead v7.2.1

Virtual Box v6.0.8

MySQL v5.7.26

08 Nov
10 months ago

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

@D9705996 - it says

"Cannot read property '$route' of undefined"

on

Vue.nextTick().then(function () {
    console.log(this.$route.query);
});

any other ideas?

05 Nov
10 months 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
10 months 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
1 year 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 but I'll mark your reply as correct for anyone who made the same mistake as I did.

12 Sep
1 year 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://my-domain.com/, [
    'form_params' => [
        'action' => 'read'
    ],
    'headers' => [
        'Authorization' => 'Bearer 57aa62501a7fe0d3b71de5712cdb1998'
    ]
]);

return $client->getBody();
11 Sep
1 year 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.

L A R A V E L  E C H O  S E R V E R

version 1.3.8

⚠ Starting server in DEV mode...

{ Error: EACCES: permission denied, open '/etc/ssl/private/my-domain.dev.key'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:45:25
    at new Promise (<anonymous>)
    at Server.secure (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:39:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:28:23
    at new Promise (<anonymous>)
    at Server.serverProtocol (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:26:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:17:19
    at new Promise (<anonymous>)
    at Server.init (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/server.js:16:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/echo-server.js:45:26
    at new Promise (<anonymous>)
    at EchoServer.run (/home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/echo-server.js:41:16)
    at /home/skeith/.npm-global/lib/node_modules/laravel-echo-server/dist/cli/cli.js:156:18
    at FSReqWrap.oncomplete (fs.js:135:15)
  errno: -13,
  code: 'EACCES',
  syscall: 'open',

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

/etc/ssl/certs

and

/etc/ssl/private

Folder user group permissions

drwxr-xr-x   4 root root      4096 Jul 22 05:15 .
drwxr-xr-x 131 root root     12288 Sep  8 13:22 ..
drwxr-xr-x   2 root root     20480 Sep  6 14:24 certs
-rw-r--r--   1 root root     10771 Apr 26 01:03 openssl.cnf
drwx--x---   2 root ssl-cert  4096 Sep  6 14:24 private

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

14 Jun
1 year 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. I wonder whats causing this error.

skeith22 left a reply on Let's Encrypt ERR_SSL_VERSION_OR_CIPHER_MISMATCH

@NickVahalik it's 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
1 year 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 but admin.test.domain.com is not.

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

**NOTE HTTP is working fine. HTTPS is not.

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
}

removing the SSL Cert and returning to HTTP is working fine.

04 Jun
1 year ago

skeith22 left a reply on How To Access Vuex In BeforeRouteEnter

@rin4ik My vuex is already global and working just fine because I can access it anywhere with

this.$store

but not inside route guard methods like beforeRouteEnter, beforeRouteUpdate and etc.

But I got it working, but its kinda stupid but who cares, so I don't have to import every time. I kinda have OC while coding that's why I don't like importing things that are always the same, I tend to find a way to things very easy for me.

I think you might find this very useful too.

now everything is global.

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: {
        //
    }
});

// To access vuex in route guard methods
window.Store = store;

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