How can I paginate an array of objects in Laravel?

|
poppyhusk 2021-09-08 10:12:50
BaronNo1 2021-09-08 09:52:40
That’s all

hi, i cannot see the actual error message

nowodev 2021-09-08 10:15:11
Good day guys. Quick help.

I have a page (class) and in this page, there is a form consisting of 2 select boxes.
One for teacher, one for subjects.

So for each class, I’m trying to insert a teacher and a subject.

Hence the result should be something like
Class 1 = [
Teacher => blah,
Subject => blah
]

But I used a polymorphic relationship and what it actually does is insert 2 values in the table

Class 1 = [
Teacher => Blah
] [
Subject => Blah
]

Is there any possible way to insert the two values at once for each class?

Amit Das 2021-09-08 10:20:52
Hi! All looking for a part time / freelancer laravel / fullstack developer .please DM me
AsadbekXalimjonov 2021-09-08 10:23:01
nowodev 2021-09-08 10:15:11
Good day guys. Quick help.

I have a page (class) and in this page, there is a form consisting of 2 select boxes.
One for teacher, one for subjects.

So for each class, I’m trying to insert a teacher and a subject.

Hence the result should be something like
Class 1 = [
Teacher => blah,
Subject => blah
]

But I used a polymorphic relationship and what it actually does is insert 2 values in the table

Class 1 = [
Teacher => Blah
] [
Subject => Blah
]

Is there any possible way to insert the two values at once for each class?

yes it’s possible

SureshLaraDev 2021-09-08 10:24:27
nowodev 2021-09-08 10:15:11
Good day guys. Quick help.

I have a page (class) and in this page, there is a form consisting of 2 select boxes.
One for teacher, one for subjects.

So for each class, I’m trying to insert a teacher and a subject.

Hence the result should be something like
Class 1 = [
Teacher => blah,
Subject => blah
]

But I used a polymorphic relationship and what it actually does is insert 2 values in the table

Class 1 = [
Teacher => Blah
] [
Subject => Blah
]

Is there any possible way to insert the two values at once for each class?

Yes

nowodev 2021-09-08 10:25:46
AsadbekXalimjonov 2021-09-08 10:23:01
yes it’s possible

Please explain

Dilawar Naseem 2021-09-08 10:33:29
laravel_discuss-93750.jpg

Dilawar Naseem 2021-09-08 10:33:29
laravel_discuss-93749.jpg

Dilawar Naseem 2021-09-08 10:33:29
laravel_discuss-93748.jpg

Dilawar Naseem 2021-09-08 10:33:29
laravel_discuss-93747.jpg

Dilawar Naseem 2021-09-08 10:34:46
Please Help
flyingdragons 2021-09-08 10:51:38
larnolimit 2021-09-08 06:22:26
how to upload project laravel to server?

Which server are you using?

flyingdragons 2021-09-08 10:52:02
And is it LEMP or LAMP you actually planning for
Abbas_roholamin 2021-09-08 10:57:44
Dilawar Naseem 2021-09-08 10:34:46
Please Help

That’s because a PHP array does not have any method, so calling links or whatever else on the array itself won’t work.

You should add custom pagination to the array, and to achieve that take a look here https://stackoverflow.com/a/63392687/1457270

How can I paginate an array of objects in Laravel?Stack Overflow
I’m building an application using Laravel 4.2. I have a model for units and another for users and pivot table user_units. Every user in this application can select a unit and add it to his favorite…
2021-09-08 10:58:09
Dilawar Naseem 2021-09-08 10:33:29

https://stackoverflow.com/questions/40677482/call-to-a-member-function-links-on-array-in-laravel/40678131

Call to a member function links() on array in laravelStack Overflow
I dont know what happens. I am using pagination but it gives me error
like:- Call to a member function links() on array

Here is My code
Function:-

enter code here
use IlluminatePagination

2021-09-08 10:58:19
2021-09-08 10:58:09
https://stackoverflow.com/questions/40677482/call-to-a-member-function-links-on-array-in-laravel/40678131

plz check the link

Dilawar Naseem 2021-09-08 10:59:57
Let check it
Soumen954 2021-09-08 11:02:42
Anyone have you any idea of how to retrieve Facebook user data like all post comment in laravel
Shiv_95 2021-09-08 13:14:26
Hi guys i want to show dates select in multi date picker how can I do that in jquery
Narayan Ji 2021-09-08 13:15:58
Anyone here , I need help whose use atom as well as laragon.i need help regarding atom-beautify package
Soumen954 2021-09-08 13:23:03
how to get facebook post with the comment’s and recation’s in my website
2021-09-08 13:52:21
Soumen954 2021-09-08 13:23:03
how to get facebook post with the comment’s and recation’s in my website

Curl

bryan_king 2021-09-08 15:05:17
laravel_discuss-93768.jpg
Can someone please help ????
dondon971 2021-09-08 15:16:36
laravel_discuss-93769.jpg
hello guys i have bug here please anyone to help me on how to fix this bug?
MichaelAbbey 2021-09-08 15:46:37
dondon971 2021-09-08 15:16:36
hello guys i have bug here please anyone to help me on how to fix this bug?

Download imagick setup and add it to your path

flyingdragons 2021-09-08 16:12:17
Soumen954 2021-09-08 11:02:42
Anyone have you any idea of how to retrieve Facebook user data like all post comment in laravel

It can be access via Facebook Graph Api

Try google it. You will get all the details in the Facebook Developer Webiste

Soumen954 2021-09-08 16:12:51
flyingdragons 2021-09-08 16:12:17
It can be access via Facebook Graph Api

Try google it. You will get all the details in the Facebook Developer Webiste

Thank you bro

likemind021 2021-09-08 16:13:29
Good Day house, please I’m my Laravel project isn’t connecting to database
likemind021 2021-09-08 16:13:59
laravel_discuss-93776.jpg

likemind021 2021-09-08 16:14:25
What could be the problem ?
likemind021 2021-09-08 16:14:46
laravel_discuss-93778.jpg

likemind021 2021-09-08 16:15:15
laravel_discuss-93779.jpg

flyingdragons 2021-09-08 16:16:08
dondon971 2021-09-08 15:16:36
hello guys i have bug here please anyone to help me on how to fix this bug?

Its the library that is used for image manipulation.

You need to install it in your system first

flyingdragons 2021-09-08 16:17:54
likemind021 2021-09-08 16:14:25
What could be the problem ?

Your application is not able to connect to database.

flyingdragons 2021-09-08 16:18:17
likemind021 2021-09-08 16:14:46

Instead of 127.0.0.1 use localhost and check once

|