skeith22

Web Developer at HYBrain Development Corporation

Experience

16,920

0 Best Reply Awards

  • Member Since 7 Months Ago
  • 161 Lessons Completed
  • 0 Favorites

7th February, 2018

skeith22 left a reply on Can Laravel 5.5 Horizon Use Controller Method Instead Of Closure? • 1 week 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 • 1 week 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 weeks 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 • 1 month ago

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

8th January, 2018

skeith22 started a new conversation Filter Datebetween Using A Collection • 1 month 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? • 2 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? • 2 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 • 2 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 • 2 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 • 2 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 • 2 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 • 2 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 • 3 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 • 3 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 • 3 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 • 4 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. • 4 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. • 4 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. • 4 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. • 4 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. • 4 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 • 5 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. • 6 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. • 6 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 • 6 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? • 6 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 • 7 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 • 7 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 • 7 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.