skeith22

Web Developer at HYBrain Development Corporation

Experience

18,490

0 Best Reply Awards

  • Member Since 10 Months Ago
  • 173 Lessons Completed
  • 0 Favorites

30th April, 2018

skeith22 started a new conversation Laravel 5.6 Net::ERR_INCOMPLETE_CHUNKED_ENCODING • 3 weeks 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 • 1 month 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 • 1 month 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) • 2 months ago

I having this issue right now

20th March, 2018

skeith22 started a new conversation Laravel Horizon And Events Are Failing • 2 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 • 2 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 • 2 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 • 2 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 • 2 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 • 2 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? • 2 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? • 2 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? • 3 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? • 3 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 • 3 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 • 4 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 • 4 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 • 4 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? • 5 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? • 5 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 • 5 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 • 5 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 • 5 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 • 5 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 • 5 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 • 6 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 • 6 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 • 6 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 • 7 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. • 7 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. • 7 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. • 7 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. • 7 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. • 7 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 • 9 months 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. • 9 months 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. • 9 months 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?

31st July, 2017

skeith22 left a reply on Why Storage Class Doesn't Have A Storage() Helper Function ITS A NEED!! :D • 9 months ago

@jlrdw thanks for the reply I already found the solution for it.

26th July, 2017

skeith22 left a reply on How Do I Get All Users With Roles Where Role = 'admin' Using Eloquent Along With Entrust? • 9 months ago

This is the answer

User::whereHas('roles', function ($query) {
$query->where('id', 1);
});

17th July, 2017

skeith22 left a reply on Why Storage Class Doesn't Have A Storage() Helper Function ITS A NEED!! :D • 10 months ago

@Snapey hmmm..let me see I'll try again using the asset() helper.

but Storage::url() clearly goes with using the

request()->picture->store('public/your_folder');

or

request()->image->store('public/your_folder');

or

request()->photo->store('public/your_folder');

15th July, 2017

skeith22 left a reply on Why Storage Class Doesn't Have A Storage() Helper Function ITS A NEED!! :D • 10 months ago

@Snapey the url for you to display it on the view.

skeith22 started a new conversation Why Storage Class Doesn't Have A Storage() Helper Function • 10 months ago

I'm lately creating a project that involves uploading a lot of files and displaying them specially images.

its kinda bothersome that you need to include

use Illuminate\Support\Facades\Storage

in almost all of your controllers cause you need the function

Storage::url()

for you to display images in your view instead of if we have

storage()->url()

we don't need to include

use Illuminate\Support\Facades\Storage

we could just use the storage() helper function in the views to pull files in the Storage

Edit Your Profile
Update

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