What is the best way toi get user country name automaitcaly?

|
Bright 2022-04-02 20:52:59
Flavio Valentim 2022-03-31 17:48:12
Good morning developers,
if someone can help me
when the adm changes the status of user A, there would be a way to force the user to login again

Is easy, Google it, Google it, use if statement

tipsysmino 2022-04-02 22:13:44
Is it possible to run npm run dev after running npm run prod when you need to modify or fix some bugs
faissaloux 2022-04-02 22:19:57
tipsysmino 2022-04-02 22:13:44
Is it possible to run npm run dev after running npm run prod when you need to modify or fix some bugs

Yes

tipsysmino 2022-04-02 22:20:18
Okay thanks 🙏
faissaloux 2022-04-02 22:20:34
tipsysmino 2022-04-02 22:20:18
Okay thanks 🙏

U wlcm

masmos08 2022-04-02 22:30:39
I’m sure stuck and need some help, I have 3 tables namely; 1. Branch, Staff & BranchManager, the BranchManager Table links the two tables with staff_id and branch_id which are unique keys but reference respective tables. I’m trying to access the staff who manage s which department using hasOne method but I’m failing to get it, some help. THANKS
Hussain4real 2022-04-02 22:54:31
Please I need help with setting up Hot module replacement using mix and valet ssl
Acird Burn 2022-04-02 23:01:26
Any Amazon aws expert here need some help
Bhuvi100 2022-04-02 23:16:37
masmos08 2022-04-02 22:30:39
I’m sure stuck and need some help, I have 3 tables namely; 1. Branch, Staff & BranchManager, the BranchManager Table links the two tables with staff_id and branch_id which are unique keys but reference respective tables. I’m trying to access the staff who manage s which department using hasOne method but I’m failing to get it, some help. THANKS

So a “Branch” can have multiple “Staff”s?

Bhuvi100 2022-04-02 23:17:39
You have used “BranchManager” as pivot table’s name, which as far as I can understand, you are trying to relate a “Branch” with its manager who is in “Staff” table right?
Venusky 2022-04-02 23:23:55
What is the best way toi get user country name automaitcaly ?
Am using laravel 8
poppyhusk 2022-04-02 23:29:55
ritechoice23 2022-04-02 20:20:44
Please i need an advice.

I want to start a new project and i am thinking on using laravel module package to manage modularity of it.

Is there any downside. Thanks for your response.

you’re on right direction…m

masmos08 2022-04-02 23:30:58
Bhuvi100 2022-04-02 23:16:37
So a “Branch” can have multiple “Staff”s?

Yes please

masmos08 2022-04-02 23:31:46
Bhuvi100 2022-04-02 23:17:39
You have used “BranchManager” as pivot table’s name, which as far as I can understand, you are trying to relate a “Branch” with its manager who is in “Staff” table right?

Exactly

Bhuvi100 2022-04-02 23:33:07
masmos08 2022-04-02 23:31:46
Exactly

So only one “Manager” per “Branch”?

masmos08 2022-04-02 23:44:07
Bhuvi100 2022-04-02 23:33:07
So only one “Manager” per “Branch”?

Yes

FA 97 2022-04-03 04:37:45
Is there anyone who can help a junior developer
Bhuvi100 2022-04-03 07:15:07
masmos08 2022-04-02 23:44:07
Yes

Then there is no need of a pivot table

Bhuvi100 2022-04-03 07:16:54
Just add a column like “manager_id” in “Branch” table and store the manager’s “Staff” id in it
silentknighte 2022-04-03 08:11:35
Ada yang bisa buat sender?
2022-04-03 09:43:11
I’m using Laravel 9.1, and trying to broadcast on private channels, but unlike the public channels, it doesn’t work for some reason!

> I’ve tried both soketi and websockets; In both, I had the same result.

I have an event like this:

class newMessage implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public string $message;

public function __construct($message = null)
{
$this->message = $message;
}

public function broadcastOn()
{
return new PrivateChannel(‘notification.’ . auth()->user()->username);
}
}

When in broadcastOn I return an instance of Channel, everything works pretty well, but when I change it to PrivateChannel, it doesn’t work anymore.

channels.php

Broadcast::channel(‘notification.{username}’, function ($user, $username) {
return true;
});

# Configs

In the the BroadcastServiceProvider.php file, I’ve tried all these possibilities:

+ Broadcast::routes();
+ Broadcast::routes([‘middleware’ => [‘auth:api’]]);

none of them worked.

config/broadcasting.php

‘pusher’ => [
‘driver’ => ‘pusher’,
‘key’ => env(‘PUSHER_APP_KEY’),
‘secret’ => env(‘PUSHER_APP_SECRET’),
‘app_id’ => env(‘PUSHER_APP_ID’),
‘options’ => [
‘cluster’ => env(‘PUSHER_APP_CLUSTER’),
‘host’ => env(‘PUSHER_HOST’, ‘127.0.0.1’),
‘port’ => env(‘PUSHER_PORT’, 6001),
‘scheme’ => env(‘PUSHER_SCHEME’, ‘http’),
‘useTLS’ => false,
‘encrypted’ => false,
],
],

# Note

When I broadcast on public channels, websockets console returns:

Connection id 76490676.561659290 sending message {“channel”:”notification.admin”,”event”:”App\Events\newMessage”,”data”:”{“message”:”[2022\/04\/03 06:26:53]: Pigeon had finished. ‘As if it wasn’t very civil of you to learn?’ ‘Well, there was mouth enough for it now, I suppose, by being drowned in my size; and as Alice could not be denied, so she tried.”,”date”:”2022-04-03T06:26:53.988364Z”}”}

But in private channels, when I try to broadcast something, it doesn’t return or log anything at all; so it looks for some reason, Laravel even doesn’t send the request to the socket server.

2022-04-03 09:58:34
2022-04-03 09:43:11
I’m using Laravel 9.1, and trying to broadcast on private channels, but unlike the public channels, it doesn’t work for some reason!

> I’ve tried both soketi and websockets; In both, I had the same result.

I have an event like this:

class newMessage implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public string $message;

public function __construct($message = null)
{
$this->message = $message;
}

public function broadcastOn()
{
return new PrivateChannel(‘notification.’ . auth()->user()->username);
}
}

When in broadcastOn I return an instance of Channel, everything works pretty well, but when I change it to PrivateChannel, it doesn’t work anymore.

channels.php

Broadcast::channel(‘notification.{username}’, function ($user, $username) {
return true;
});

# Configs

In the the BroadcastServiceProvider.php file, I’ve tried all these possibilities:

+ Broadcast::routes();
+ Broadcast::routes([‘middleware’ => [‘auth:api’]]);

none of them worked.

config/broadcasting.php

‘pusher’ => [
‘driver’ => ‘pusher’,
‘key’ => env(‘PUSHER_APP_KEY’),
‘secret’ => env(‘PUSHER_APP_SECRET’),
‘app_id’ => env(‘PUSHER_APP_ID’),
‘options’ => [
‘cluster’ => env(‘PUSHER_APP_CLUSTER’),
‘host’ => env(‘PUSHER_HOST’, ‘127.0.0.1’),
‘port’ => env(‘PUSHER_PORT’, 6001),
‘scheme’ => env(‘PUSHER_SCHEME’, ‘http’),
‘useTLS’ => false,
‘encrypted’ => false,
],
],

# Note

When I broadcast on public channels, websockets console returns:

Connection id 76490676.561659290 sending message {“channel”:”notification.admin”,”event”:”App\Events\newMessage”,”data”:”{“message”:”[2022\/04\/03 06:26:53]: Pigeon had finished. ‘As if it wasn’t very civil of you to learn?’ ‘Well, there was mouth enough for it now, I suppose, by being drowned in my size; and as Alice could not be denied, so she tried.”,”date”:”2022-04-03T06:26:53.988364Z”}”}

But in private channels, when I try to broadcast something, it doesn’t return or log anything at all; so it looks for some reason, Laravel even doesn’t send the request to the socket server.

https://stackoverflow.com/questions/71723675/laravel-unlike-the-public-channels-private-channels-dont-work

Laravel – Unlike the public channels, private channels don’t workStack Overflow
I’m using Laravel 9.1, and trying to broadcast on private channels, but unlike the public channels, it doesn’t work for some reason!
I have an event like this:
class newMessage implements ShouldBro…
2022-04-03 11:22:24
2022-04-03 09:43:11
I’m using Laravel 9.1, and trying to broadcast on private channels, but unlike the public channels, it doesn’t work for some reason!

> I’ve tried both soketi and websockets; In both, I had the same result.

I have an event like this:

class newMessage implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public string $message;

public function __construct($message = null)
{
$this->message = $message;
}

public function broadcastOn()
{
return new PrivateChannel(‘notification.’ . auth()->user()->username);
}
}

When in broadcastOn I return an instance of Channel, everything works pretty well, but when I change it to PrivateChannel, it doesn’t work anymore.

channels.php

Broadcast::channel(‘notification.{username}’, function ($user, $username) {
return true;
});

# Configs

In the the BroadcastServiceProvider.php file, I’ve tried all these possibilities:

+ Broadcast::routes();
+ Broadcast::routes([‘middleware’ => [‘auth:api’]]);

none of them worked.

config/broadcasting.php

‘pusher’ => [
‘driver’ => ‘pusher’,
‘key’ => env(‘PUSHER_APP_KEY’),
‘secret’ => env(‘PUSHER_APP_SECRET’),
‘app_id’ => env(‘PUSHER_APP_ID’),
‘options’ => [
‘cluster’ => env(‘PUSHER_APP_CLUSTER’),
‘host’ => env(‘PUSHER_HOST’, ‘127.0.0.1’),
‘port’ => env(‘PUSHER_PORT’, 6001),
‘scheme’ => env(‘PUSHER_SCHEME’, ‘http’),
‘useTLS’ => false,
‘encrypted’ => false,
],
],

# Note

When I broadcast on public channels, websockets console returns:

Connection id 76490676.561659290 sending message {“channel”:”notification.admin”,”event”:”App\Events\newMessage”,”data”:”{“message”:”[2022\/04\/03 06:26:53]: Pigeon had finished. ‘As if it wasn’t very civil of you to learn?’ ‘Well, there was mouth enough for it now, I suppose, by being drowned in my size; and as Alice could not be denied, so she tried.”,”date”:”2022-04-03T06:26:53.988364Z”}”}

But in private channels, when I try to broadcast something, it doesn’t return or log anything at all; so it looks for some reason, Laravel even doesn’t send the request to the socket server.

No one?

Garrry601 2022-04-03 11:44:29
My app is in flutter and backend is in laravel, it has delivery boy app but i want to remove that and add shiprocket api.. anyone can do that, i will to him or her
Garrry601 2022-04-03 11:45:09
Garrry601 2022-04-03 11:44:29
My app is in flutter and backend is in laravel, it has delivery boy app but i want to remove that and add shiprocket api.. anyone can do that, i will to him or her

Pay*

RAJESHMAREBOINA 2022-04-03 11:59:49
Indians only
nagakishorekosuri 2022-04-03 12:12:58
Remote location ?
zey34354 2022-04-03 13:07:16
cletuskingdom 2022-04-01 03:18:23

it was not enough

zey34354 2022-04-03 13:07:26
and nothing solved
zey34354 2022-04-03 13:08:36
laravel_discuss-113836.jpg
I have this problem
Stan 2022-04-03 13:19:46
zey34354 2022-04-03 13:08:36
I have this problem

What is before it?

Javohir_Ruziqulov 2022-04-03 13:54:58
I have this problem
Javohir_Ruziqulov 2022-04-03 13:55:49
laravel_discuss-113843.jpg

Javohir_Ruziqulov 2022-04-03 13:56:30
Javohir_Ruziqulov 2022-04-03 13:55:49

who can fix it

zey34354 2022-04-03 14:19:44
laravel_discuss-113846.jpg
what is the problem in this exactly ?
|