Do you know authentification in laravel 9?

|
GlobalBeast 2022-05-24 20:43:46
do you know authentification in laravel 9?
GlobalBeast 2022-05-24 20:43:57
You can use that.
anujrock1 2022-05-24 20:43:59
M 2022-05-24 20:41:02

Are you sending valid credentials?

GlobalBeast 2022-05-24 20:44:16
The authentification function was upgraded in laravel 9
M 2022-05-24 20:44:25
anujrock1 2022-05-24 20:43:03
What’s the issue are you facing?

BadMethodCallException: Method AppHttpControllersAPIAuthController::login does not exist. in file /var/www/clients/client1/web20/web/oauthserver/vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 68

M 2022-05-24 20:44:49
anujrock1 2022-05-24 20:43:59
Are you sending valid credentials?

yes

anujrock1 2022-05-24 20:45:07
GlobalBeast 2022-05-24 20:44:16
The authentification function was upgraded in laravel 9

No bro don’t know about it

GlobalBeast 2022-05-24 20:45:45
Don’t worry about it.
anujrock1 2022-05-24 20:45:53
M 2022-05-24 20:44:49
yes

Send us postman ss, we want to se how you are sending request

M 2022-05-24 20:47:16
laravel_discuss-122341.jpg

anujrock1 2022-05-24 20:48:50
M 2022-05-24 20:47:16

Not clear,

I guess remove? From url bar

anujrock1 2022-05-24 20:49:38
Url should be like
baseurl/api/login
M 2022-05-24 20:50:16
my vhost documentroot laravel public folfer
anujrock1 2022-05-24 20:51:50
M 2022-05-24 20:50:16
my vhost documentroot laravel public folfer

localhost/api/login

M 2022-05-24 20:53:33
laravel project folder in public folder== documentroot
anujrock1 2022-05-24 20:54:17
M 2022-05-24 20:53:33
laravel project folder in public folder== documentroot

So replace according

faissaloux 2022-05-24 20:57:02
M 2022-05-24 20:33:57

If this controller is not the right API controller you routing to

faissaloux 2022-05-24 20:57:21
You are routing to controller inside API folder
M 2022-05-24 20:58:18
faissaloux 2022-05-24 20:57:02
If this controller is not the right API controller you routing to

Route::post(‘login’, [APIAuthController::class, ‘login’]);

anujrock1 2022-05-24 20:58:20
faissaloux 2022-05-24 20:57:02
If this controller is not the right API controller you routing to

Yes I also missed that

anujrock1 2022-05-24 20:58:57
M 2022-05-24 20:58:18
Route::post(‘login’, [APIAuthController::class, ‘login’]);

Your controller is not inside api folder

faissaloux 2022-05-24 20:59:11
M 2022-05-24 20:34:30

Your route is good, just show us that Authcontroller inside API folder

anujrock1 2022-05-24 21:00:15
M 2022-05-24 20:58:18
Route::post(‘login’, [APIAuthController::class, ‘login’]);

laravel_discuss-122355.jpg
Remove this API or make a folder inside controller folder and place AuthController there

M 2022-05-24 21:02:52
anujrock1 2022-05-24 21:00:15
Remove this API or make a folder inside controller folder and place AuthController there

now error

anujrock1 2022-05-24 21:03:03
M 2022-05-24 21:02:52
now error

What?

M 2022-05-24 21:03:34
now it gave this error
bank 2022-05-24 21:13:29
Good afternoon
Guys how can I build this SQL in eloquent?

SELECT AVG(bidPrice)
FROM (SELECT bidPrice
FROM persistings
WHERE symbol = ‘ONTUSDT’
ORDER BY persistings.symbol ASC
LIMIT 5) sub

I ask you to help me please it is part of a selection process

#help

JeevaniSM 2022-05-24 21:15:07
SIMFLEXX 2022-05-24 17:58:29
hello can anyone help how to install supervisor in my laravel app,
Im using dockerize laravel app, nginx server,
im working in windows computer, Ive seen many tutorials running linux, but Im using windows can anybody give me idea thanks

Please check Laravel sail pre installed Dockerfile, it has the instructions to install supervisor

anujrock1 2022-05-24 21:26:20
bank 2022-05-24 21:13:29
Good afternoon
Guys how can I build this SQL in eloquent?

SELECT AVG(bidPrice)
FROM (SELECT bidPrice
FROM persistings
WHERE symbol = ‘ONTUSDT’
ORDER BY persistings.symbol ASC
LIMIT 5) sub

I ask you to help me please it is part of a selection process

#help

I am not good in raw sql

But I guess your question is that

If you want to get only average bidPrice from persistings table where symbol = ‘ONTUSDT’ order by persiatings. Symbol ASC limit 5

I miss something?

M 2022-05-24 21:26:44
https://www.mywebtuts.com/blog/laravel-9-passport-rest-api-tutorial

Laravel 9 Passport REST API Tutorial – MyWebtuts.comMywebtuts
Laravel 9 Passport REST API Tutorial , passport authentication in laravel 9 application , user authentication and a simple form of access control in an API using Laravel and Passport. , Laravel 9 API authentication with passport tutorial.rest APIs with passport authentication in Laravel 9.
bank 2022-05-24 21:28:06
anujrock1 2022-05-24 21:26:20
I am not good in raw sql

But I guess your question is that

If you want to get only average bidPrice from persistings table where symbol = ‘ONTUSDT’ order by persiatings. Symbol ASC limit 5

I miss something?

Exactly

anujrock1 2022-05-24 21:36:01
bank 2022-05-24 21:28:06
Exactly

$bid_avg_price = Persisting::where(‘symbol’, ‘ONTUSTD’)->orderBy(‘symbol’, ASC)->limit(5)->pluck(‘bidPrick’)->avg();

I thik this will work

bank 2022-05-24 21:46:55
Works perfectly thanks
GlobalBeast 2022-05-24 21:50:26
How can we use GroupBy and OrderBy with Laravel ORM
anujrock1 2022-05-24 21:54:02
GlobalBeast 2022-05-24 21:50:26
How can we use GroupBy and OrderBy with Laravel ORM

You can see I have used orderBy in above code

we I have used it much in my current company,

Will share some screen shot tomorrow with you

|