← prev | next →
VishwanathTK 2019-12-06 10:57:26
$appointments = Appointment::with(‘patient’)->whereDate(‘datetime’, ‘>=’, date(‘2019-12-03’))->get();
return AppointmentsResource::collection($appointments);
I have tried this, but as I said the “where” clause seem to be creating problem
VishwanathTK 2019-12-06 10:58:32
without the where clause when I use
$appointments = Appointment::with(‘patient’)->paginate();
return AppointmentsResource::collection($appointments);
I am able to access the property on “Patient”
VishwanathTK 2019-12-06 10:59:34
the appointments table contains lots of records and at any given point of time, we want to load only “today and onwards” records
VishwanathTK 2019-12-06 11:02:54
I guess, when the where clause is used on Eloquent model the resulting “Patient” data is returned as array instead of object
skys215 2019-12-06 11:15:32
the Resource will convert the object to array
VishwanathTK 2019-12-06 11:24:22
that’s correct, but inside the Resources file the $this->patient[‘firstname’] is what is working instead of $this->patient->firstname
VishwanathTK 2019-12-06 11:25:02
so, the “patient” seem to be array instead of object, that’s what I meant
DesolatorMagno 2019-12-06 18:27:52
But I don’t see the same, in 1 you use get and in another you use the paginate, so you can’t reach at the conclusion that is the where that is doing that.
DesolatorMagno 2019-12-06 18:29:35
And besides using a where give you the possibility that the consult return empty.
skys215 2019-12-06 20:21:05
I think that’s not a Laravel problem
mmosttaffaa 2019-12-06 20:34:27
skys215 2019-12-06 20:21:05
I think that’s not a Laravel problem
yeah. I deleted it
Fawad Jabarkhil 2019-12-06 23:50:07
hi how can count I’d and show relate rata of table please
DesolatorMagno 2019-12-07 00:27:25
Fawad Jabarkhil 2019-12-06 23:50:07
hi how can count I’d and show relate rata of table please
https://laravel.com/docs/5.8/eloquent-relationships
rebory 2019-12-07 08:11:56
any package to get client currunt location ?
rebory 2019-12-07 08:14:17
means best package for getting LOCATION
skys215 2019-12-07 09:56:59
browser can get user location
mmosttaffaa 2019-12-07 10:51:03
rebory 2019-12-07 08:11:56
any package to get client currunt location ?
Just use the javascript navigator object. its so simple
rrajesh011 2019-12-07 11:11:00
Variable passed via redirect()->with() in blade are null
rrajesh011 2019-12-07 11:11:23
rrajesh011 2019-12-07 11:11:29
rrajesh011 2019-12-07 11:11:23
Controller
rrajesh011 2019-12-07 11:11:51
Blade
rrajesh011 2019-12-07 11:12:38
rrajesh011 2019-12-07 11:13:01
rrajesh011 2019-12-07 11:13:07
rrajesh011 2019-12-07 11:13:01
Output
rrajesh011 2019-12-07 11:13:49
Any help
rrajesh011 2019-12-07 11:13:56
I’m new in laravel
2019-12-07 11:18:41
rrajesh011 2019-12-07 11:11:23
; clear!
rrajesh011 2019-12-07 11:20:54
2019-12-07 11:18:41
; clear!
Clear what
2019-12-07 11:21:21
2 ; is code
2019-12-07 11:21:42
rrajesh011 2019-12-07 11:11:23
here
rrajesh011 2019-12-07 11:21:55
2019-12-07 11:25:12
Session::flash(‘status’, ‘message is here’);
return redirect(‘/balance-score’);
2019-12-07 11:25:36
2019-12-07 11:25:12
Session::flash(‘status’, ‘message is here’);
return redirect(‘/balance-score’);
you can use session
2019-12-07 11:26:33
up controller is add » use IlluminateSupportFacadesSession;
rrajesh011 2019-12-07 11:30:53
2019-12-07 11:25:36
you can use session
Same syntax in blade?
2019-12-07 11:32:42
rrajesh011 2019-12-07 11:30:53
Same syntax in blade?
in blade is insert code » @if(Session::has(‘status’))
<div class=”alert alert-success”>
<div>{{session(‘success’)}}</div>
</div>
@endif
rrajesh011 2019-12-07 11:34:31
2019-12-07 11:32:42
in blade is insert code » @if(Session::has(‘status’))
<div class=”alert alert-success”>
<div>{{session(‘success’)}}</div>
</div>
@endif
Session flash not working
rrajesh011 2019-12-07 11:34:38
Session::put working
2019-12-07 11:37:57
2019-12-07 11:32:42
in blade is insert code » @if(Session::has(‘status’))
<div class=”alert alert-success”>
<div>{{session(‘success’)}}</div>
</div>
@endif
status is change by success
rrajesh011 2019-12-07 11:39:06
Something is wrong with my laravel session
rrajesh011 2019-12-07 11:39:11
Toastr also not working
rrajesh011 2019-12-07 11:39:14
On redirect
2019-12-07 11:40:03
import add class in blade?
2019-12-07 11:42:16

add class by click on use class session
2019-12-07 11:44:07
2019-12-07 11:42:16
add class by click on use class session
you edit success by status » ok
rebory 2019-12-07 14:03:49

step1
rebory 2019-12-07 14:04:07
rebory 2019-12-07 14:03:49
step1

step2
rebory 2019-12-07 14:04:30

step 3
rebory 2019-12-07 14:04:50
rebory 2019-12-07 14:06:53

view
← prev | next →