Janaka

Experience

7,210

0 Best Reply Awards

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

2nd March, 2018

Janaka left a reply on Is It Safe To Add `stream` Key In Mail.php In Laravel? • 5 months ago

Since this is only a configuration key and does not contain any sensitive information, I dont see anything wrong :)

Janaka started a new conversation Sharing Session With Laravel 5.1 And Laravel 5.5 App • 5 months ago

Hi, I'm trying to share sessions between Laravel 5.5 app and a Laravel 5.1 app. I configured sessions configurations of Laravel 5.5 app to 5.1 app (since 5.1 app is the master app). I'm sharing the same domain and structure is as follows, www.<5.1 app>.com/<5.5 app name>

I was able to see sessions in 5.5 app when I set sessions in 5.1 app . But the problem is I cannot seems to share Auth users across these two apps. I understand there are few different changes in Authenticating methods for an example in 5.5 app it looks for the session key like login_web_xxx wherein 5.1 app it looks for login_xxxx.

I suppose if I change that session key, I might be able to access 5.1 user data. In 5.5 it uses following method to get the session key for the user (SessionGuard line 616)

/** * Get a unique identifier for the auth session value. * * @return string */ public function getName() { return 'login_'.$this->name.'_'.sha1(static::class); }

Can anyone suggest me what the logic it has used to get the session key in Laravel 5.1 app?

Thank you.

12th March, 2017

Janaka started a new conversation Required_with Validation With Exists Validation Not Working • 1 year ago

Hi, I have this validation rule 'declaration_of_owner' => 'required_with:different_owner|exists:uploads,uid',

where different_owner is a checkbox. So the idea is to check the value of declaration_of_owner field match a database record is the different_owner checkbox is checked.

The problem is above rule ignores required_with:different_owner rule and try to validate exists rule if the checkbox is unchecked.

Any help to tackle this issue is highly appreciated,

Thank you

Edit Your Profile
Update

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