And how to insert value in different tables from a single form?

|
Vitaliy Peterherin 2021-04-26 15:56:32
I already saw them. Doublecheck url which you use in postman.
Kehlani1 2021-04-26 15:59:04
Anuj 2021-04-26 15:49:21
Pls sir check

Seems like you typed apiv1 instead of api/v1

Kehlani1 2021-04-26 16:01:01
Anuj 2021-04-26 15:49:05
I have send phot

Please don’t send photos, use pastebin.com or gist.github.com to share code snippets or error stack traces

SureshLaraDev 2021-04-26 16:02:06
How to populate data in input fields based on data entered in an input field. If there is no relevant data it has to be added as a new value in the relevant table. And how to insert value in different tables from a single form? Thanks in advance.
cayetanohosma 2021-04-26 16:39:08
Hi guys!
How could I found the declaration for Model::create function? I’m trying to found it but I cannot find it. I’m wondering if that is a dynamic function
cayetanohosma 2021-04-26 16:39:18
Thanks in afvance
Prem Soni 2021-04-26 17:03:49
laravel_discuss-78159.jpg

Prem Soni 2021-04-26 17:04:00
how to solve this error ?
DesolatorMagno 2021-04-26 17:04:57
Check if the file was uploaded first.
Prem Soni 2021-04-26 17:06:04
ok
Prem Soni 2021-04-26 17:07:31
yes it is uploaded
DesolatorMagno 2021-04-26 17:09:25
Them it should work, the error explain itself, it say you tried that method in a null object.
Prem Soni 2021-04-26 17:10:20
ok
Prem Soni 2021-04-26 17:15:04
DesolatorMagno 2021-04-26 17:09:25
Them it should work, the error explain itself, it say you tried that method in a null object.

solved

Severusxyz 2021-04-26 17:40:57
Prem Soni 2021-04-26 17:03:49

Surely post method or HTML form file

Severusxyz 2021-04-26 17:41:28
method=”post” enctype=”multipart/form-data”>
fireflies000 2021-04-26 17:41:37
Who can clone a page for me
fireflies000 2021-04-26 17:41:49
Paying €€€€
Severusxyz 2021-04-26 17:42:25
You mean Phishing?
Prem Soni 2021-04-26 17:42:52
Severusxyz 2021-04-26 17:41:28
method=”post” enctype=”multipart/form-data”>

it is already there

Prem Soni 2021-04-26 17:43:11
Severusxyz 2021-04-26 17:41:28
method=”post” enctype=”multipart/form-data”>

solved now

Ryan151995 2021-04-26 18:09:04
Rsdeveloper 2021-04-26 15:26:04
I have problem with Laravel Passport & Personal Access I can login and generate token but when use middleware auth for example in Route::get(‘/logout’, [AuthController::class, ‘logout’]) the servere return unauthenticated also I use Bearer token in header
how can I solve it ?
this is my code:
public function login(Request $request)
{
$data = $request->all();

$validator = Validator::make($request->all(), [
’email’ => ’email|required’,
‘password’ => ‘required’
]);

if ($validator->fails()) {
return response()->json($validator->errors()->first(), 422);
}

if (!auth()->attempt($data)) {
return response()->json(‘invalid credential’, 422);
}
$user = auth()->user();

$tokenResult = $user->createToken(‘UserToken’);

$tokenModel = $tokenResult->token;
if ($request->remember_me)
$tokenModel->expires_at = now()->addWeeks(1);
$tokenModel->save();
return response()->json([
‘user’ => new UserResource($user),
‘token’ => $tokenResult->accessToken,
‘token_type’ => ‘Bearer’
]);

}

public function logout(Request $request)
{
//dd(auth()->user());
/** @var User $user
*/
$request->user()->token()->revoke();
return response()->json(‘successfull logout’);
}

You have to pass Authorization in header in Authorizatuon you have to pass your login token using Bearer.

Rsdeveloper 2021-04-26 18:10:41
Ryan151995 2021-04-26 18:09:04
You have to pass Authorization in header in Authorizatuon you have to pass your login token using Bearer.

I do it (Bearer token) but there is problem and return unauthenticated

sobirjonovs 2021-04-26 18:29:23
Hello, Tanish aka
Tanish Singh 2021-04-26 18:29:42
laravel_discuss-78183.jpg
Laravel 8 error
sobirjonovs 2021-04-26 18:29:48
Tanish aka qoles
Tanish Singh 2021-04-26 18:29:52
Anyone can help?
Jay_1 2021-04-26 18:31:33
I dont want to count 0 value in count query but its happen in select query
fiminb 2021-04-26 18:37:08
laravel_discuss-78188.jpg

fiminb 2021-04-26 18:37:33
What is error here
DesolatorMagno 2021-04-26 18:37:43
since when taking photo is so popular? is so hard to make a screenshot?
fiminb 2021-04-26 18:38:13
DesolatorMagno 2021-04-26 18:37:43
since when taking photo is so popular? is so hard to make a screenshot?

Me

DesolatorMagno 2021-04-26 18:39:56
I mean, if you can’t take the time to explain well the problem and take a screenshot, why someone should take the time to try to understand the text so that person can them try to help you?
natghi2010 2021-04-26 19:02:25
DesolatorMagno 2021-04-26 18:37:43
since when taking photo is so popular? is so hard to make a screenshot?

It’s hard downloading the telegram app for desktop, its 11mb

natghi2010 2021-04-26 19:03:32
fiminb 2021-04-26 18:37:08

try npm cache clean –force

|