user8114666

0

votes
1

answer
22

views

How model relationships works with blades?

I have a model 'applicants' and it has a 'belongsTo' relationship with 'BloodGroup' model. Here is the index function from ApplicantController: public function index() { $user = Auth::user(); // $user = User::find(1); $applicants = $user->applicants->where('visible', 1); foreach ($applicants as $app...
user8114666
0

votes
0

answer
7

views

How does Auth works with subdomains?

I have two subdomains and one domain. api.pulsespace.test myshop.pulsespace.test pulsespace.test The problem is that after logging in, I have a controller that returns the user info using Auth::User(), but this is returning null every time. And if I try to visit the '/login' route, it will just red...
user8114666
1

votes
0

answer
128

views

What is the role of getInputStream() here?

I have a JSON object which I'm trying to write to the json file. I think the write() method of the OutputStreamWriter object is responsible for writing to the json file but if I don't add the last line 'urlConnection.getInputStream();' the changes do not take effect. Please explain what this line is...
user8114666