How to write API for post views count using laravel rest API?

|
S3NX_8 2020-10-16 19:46:56
skys215 2020-10-16 19:25:31
wrong group

Talking about jetstream

mehrb0d 2020-10-16 20:07:46
saidbeksarimsakov 2020-10-16 18:07:12
Guys Not Gays😡

He kinda swear us

Waxikevin 2020-10-16 20:42:18
skys215 2020-10-16 19:25:31
wrong group

The question is still valid

natghi2010 2020-10-16 20:42:44
saidbeksarimsakov 2020-10-16 18:07:12
Guys Not Gays😡

How do you know you are not gay?

natghi2010 2020-10-16 20:47:23
Syed Sohail 2020-10-16 15:31:12
That server is not mine basically its view created my some else for us and can’t create api on their server

Then the owner should open it up

mehrb0d 2020-10-16 20:47:54
natghi2010 2020-10-16 20:42:44
How do you know you are not gay?

yeah that’s funny, by the way…. whenever you have free time please let me know to solve the diagram

natghi2010 2020-10-16 20:48:27
Gays not guys.
Vinothkumarad 2020-10-16 21:25:58
Hi,, any one can speak tamil, who knows laravel
Syed Sohail 2020-10-16 21:26:02
natghi2010 2020-10-16 20:47:23
Then the owner should open it up

Thanks for your reply, i solved the problem using PDO

natghi2010 2020-10-16 21:26:16
Syed Sohail 2020-10-16 21:26:02
Thanks for your reply, i solved the problem using PDO

how?

Syed Sohail 2020-10-16 21:31:31
natghi2010 2020-10-16 21:26:16
how?

Connected to remote database using pdo class

natghi2010 2020-10-16 21:32:19
Syed Sohail 2020-10-16 21:31:31
Connected to remote database using pdo class

doesnt laravel do that by default?

Syed Sohail 2020-10-16 21:33:24
natghi2010 2020-10-16 21:32:19
doesnt laravel do that by default?

Can’t connect using laravel don’t know what was the issue but connected through pdo successfully

natghi2010 2020-10-16 21:34:06
Syed Sohail 2020-10-16 21:33:24
Can’t connect using laravel don’t know what was the issue but connected through pdo successfully

I see.

2020-10-16 21:35:10
Syed Sohail 2020-10-16 21:33:24
Can’t connect using laravel don’t know what was the issue but connected through pdo successfully

$conn = new PDO(“mysql:host=$servername;dbname=myDB”, $username, $password);

2020-10-16 21:35:21
somthing like this?
2020-10-16 21:35:43
its really nice syed
gxlo_supreme 2020-10-16 21:38:30
hey guys am using laravel 8 and I cant figure how to send gmail emails
gxlo_supreme 2020-10-16 21:40:31
laravel_discuss-55227.jpg
I get this error every time
Syed Sohail 2020-10-16 21:41:23
2020-10-16 21:35:21
somthing like this?

Yes same like that

gxlo_supreme 2020-10-16 21:42:08
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=*email address*
MAIL_PASSWORD=*my gmail passcode*
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=*my email*
MAIL_FROM_NAME=”${APP_NAME}”
2020-10-16 21:42:17
gxlo_supreme 2020-10-16 21:40:31
I get this error every time

you have to MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=b8bfa259dc56ba
MAIL_PASSWORD=8558180c4f567f
MAIL_ENCRYPTION=tls

gxlo_supreme 2020-10-16 21:42:20
my .env configurations
2020-10-16 21:42:36
inside ur env
gxlo_supreme 2020-10-16 21:42:55
what if I want to send to gmail directly without mailtrap
2020-10-16 21:45:41
change the mail host
2020-10-16 21:45:57
also the user name and password
gxlo_supreme 2020-10-16 21:45:58
to mailtrap.io?
natghi2010 2020-10-16 21:49:55
2020-10-16 21:42:17
you have to MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=b8bfa259dc56ba
MAIL_PASSWORD=8558180c4f567f
MAIL_ENCRYPTION=tls

can i use this?

2020-10-16 21:53:43
dont change the host
2020-10-16 21:53:55
just the password and username
2020-10-16 21:54:19
?????
gxlo_supreme 2020-10-16 21:54:37
what should I change?tried smtp.googlemail.com but it still doesn’t work
natghi2010 2020-10-16 21:54:45
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=b8bfa259dc56ba
MAIL_PASSWORD=8558180c4f567f
MAIL_ENCRYPTION=tls
natghi2010 2020-10-16 21:54:56
if i use this will it work?
natghi2010 2020-10-16 21:55:06
using that username and password?
gxlo_supreme 2020-10-16 21:55:21
it will send the mail to his mailtrap account
natghi2010 2020-10-16 21:55:45
is it free?
natghi2010 2020-10-16 21:55:59
i thought i was getting paid service for free 🙂
2020-10-16 21:56:22
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=yourEmalAddress
MAIL_PASSWORD=yourEmailPassword
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=emailAddresYouWantToSend
MAIL_FROM_NAME=”Company Name : Verify Account”
hosseinJarrahi 2020-10-16 22:28:06
Hi anyone, how has a course about swoole?
2020-10-16 22:38:11
Hello everybody
I’m new to the vue js and I’m facing an issue with it
I already have a project build by vue and i want to add google map address to it so just when i add my html tags that related to the Google maps inside the vue components and my script outside the vue section then it’s seems like that my script call never execute and the map content disappear

But when i add the html tags outside the vue components the map works good

2020-10-16 22:38:38
I don’t know why i will share a screenshot
2020-10-16 22:39:04
laravel_discuss-55256.jpg

2020-10-16 22:39:04
laravel_discuss-55255.jpg

idigram 2020-10-16 23:09:44
Hi I have two column in one model
Created_at = 2020
Updated_at = 2021

How to order products latest by create_at or updated_at is new or time is nearly changed

2020-10-17 00:12:20
naveen5566 2020-10-16 14:58:30
How to write API for post views count using laravel rest API?
Any suggestions please

Are you using collection
Then use
‘postviews’ =>$this->postViews->count()
postViews- from user model
And put this code in resource not collection

amir881231 2020-10-17 00:13:04
idigram 2020-10-16 23:09:44
Hi I have two column in one model
Created_at = 2020
Updated_at = 2021

How to order products latest by create_at or updated_at is new or time is nearly changed

$products = product::orderBy(‘created_at’, ‘desc’) ->paginate(10);

amir881231 2020-10-17 00:13:34
Put this In ur controller in the method index and then pass it to view
2020-10-17 00:13:47
Dhana
|