What is this error?

|
hellodelloarlo 2022-04-23 11:54:18
np hope it work
web design 2022-04-23 12:08:11
What is this error?
Property [latest] does not exist on this collection instance.
I want show fist episode
public function single(Course $course)
{
return view(‘Home.contents.course’, compact(‘course’));
}
My blade
@foreach($course->episodes->latest as $episode)
redamakhchan 2022-04-23 12:12:56
web design 2022-04-23 12:08:11
What is this error?
Property [latest] does not exist on this collection instance.
I want show fist episode
public function single(Course $course)
{
return view(‘Home.contents.course’, compact(‘course’));
}
My blade
@foreach($course->episodes->latest as $episode)

May be it should be a function latest() not an attribute latest

Mr Chandra 2022-04-23 12:14:24
Hello, I am a Lead software engineer having 10 years of website development experience. I provide professional training for web development (PHP, MySQL, Javascript, Jquery). It includes practical project-based knowledge and interview preparation. Limited seats. Inbox for details.
web design 2022-04-23 12:15:00
redamakhchan 2022-04-23 12:12:56
May be it should be a function latest() not an attribute latest

laravel_discuss-117740.jpg

yattu077 2022-04-23 12:20:32
yattu077 2022-04-23 11:48:40

Couldn’t fixed

yattu077 2022-04-23 12:21:03
laravel_discuss-117744.jpg
Can I change here something
Devajayantha 2022-04-23 13:18:22
web design 2022-04-23 12:15:00

Latest() use befofe collection

web design 2022-04-23 13:41:12
Devajayantha 2022-04-23 13:18:22
Latest() use befofe collection

Like this

@foreach($course->episodes->latest as $episode)

Devajayantha 2022-04-23 13:45:11
web design 2022-04-23 13:41:12
Like this

@foreach($course->episodes->latest as $episode)

Cant like that

web design 2022-04-23 14:05:55
Devajayantha 2022-04-23 13:45:11
Cant like that

PLEASE SEND cODE

Devajayantha 2022-04-23 14:06:38
web design 2022-04-23 14:05:55
PLEASE SEND cODE

You asking why me send the code?

Devajayantha 2022-04-23 14:07:18
What result $course ?
MonsterDev426 2022-04-23 14:07:48
Devajayantha 2022-04-23 14:07:18
What result $course ?

It is array.

web design 2022-04-23 14:08:53
MonsterDev426 2022-04-23 14:07:48
It is array.

yes it is an array

Devajayantha 2022-04-23 14:09:23
web design 2022-04-23 12:08:11
What is this error?
Property [latest] does not exist on this collection instance.
I want show fist episode
public function single(Course $course)
{
return view(‘Home.contents.course’, compact(‘course’));
}
My blade
@foreach($course->episodes->latest as $episode)

Show me your relation

Devajayantha 2022-04-23 14:09:55
Has many episodes
MonsterDev426 2022-04-23 14:11:31
web design 2022-04-23 12:08:11
What is this error?
Property [latest] does not exist on this collection instance.
I want show fist episode
public function single(Course $course)
{
return view(‘Home.contents.course’, compact(‘course’));
}
My blade
@foreach($course->episodes->latest as $episode)

Can you share me code?

web design 2022-04-23 14:13:37
Devajayantha 2022-04-23 14:09:55
Has many episodes

Public function episodes ()
{
return $this->hasMany(Episode::class);
}

Devajayantha 2022-04-23 14:14:46
web design 2022-04-23 14:13:37
Public function episodes ()
{
return $this->hasMany(Episode::class);
}

Public function episodes ()
{
return $this->hasMany(Episode::class)->orderByDecs();
}

Try this

Roba Nath Basnet 2022-04-23 14:47:49
If anyone has a project on user authentication and CRUD, can you please share
DrAmbition 2022-04-23 14:49:46
Anyone have Surfshark vpn for exchange of 5k smtp
Devendra_09 2022-04-23 15:27:35
Roba Nath Basnet 2022-04-23 14:47:49
If anyone has a project on user authentication and CRUD, can you please share

Yes

Devendra_09 2022-04-23 15:29:19
Anyone have many to many relationship crud ??
Devendra_09 2022-04-23 15:29:32
Plz guide
hellodelloarlo 2022-04-23 16:30:52
Roba Nath Basnet 2022-04-23 14:47:49
If anyone has a project on user authentication and CRUD, can you please share

There are so many online just search google. And for auth I read if you want simple just use breeze. Don’t use jet stream unless you want very sophisticated

Roba Nath Basnet 2022-04-23 16:34:49
hellodelloarlo 2022-04-23 16:30:52
There are so many online just search google. And for auth I read if you want simple just use breeze. Don’t use jet stream unless you want very sophisticated

Thank you so much

hellodelloarlo 2022-04-23 16:40:45
And should initialse breeze when project start, if you create your models and class with code all it can cause problem when you initialse it. Therefore do that first
Gidi 2022-04-24 05:32:13
laravel_discuss-117843.jpg
good morning all
i have a case in check i need help with

In this picture i have pulled from the database all report cards based on the current sttudent id

however i will love to pull from the database all classes who have their ids registered on the report card that i pulled and stored in the variable $reports

i tried using the where(‘report_id , $report->id) funtion but there is an issue since there is more than one id registered on the $report variable at the moment

any help please. I can add more clarifications where needed

Jyoti2083 2022-04-24 08:02:09
laravel_discuss-117856.jpg

Jyoti2083 2022-04-24 08:02:20
Getting this error
olive_soldier 2022-04-24 08:09:59
Jyoti2083 2022-04-24 08:02:09

Th array which you are trying to traverse is null. So, getting this error.

olive_soldier 2022-04-24 08:10:35
Make it as if array != Null then foreach
Jyoti2083 2022-04-24 08:28:53
Checked everything
Jyoti2083 2022-04-24 08:29:04
Getting same error
|