How to validate a spaces which is present in my login?

|
rebory 2019-10-30 14:06:50
but when i update this in edit blade multi select dropdown
rebory 2019-10-30 14:08:10
laravel_discuss-16549.jpg

an_sama 2019-10-30 15:43:16
سلام عصر بخیر، دوستان کسی واسه pdf پکیجی میشناسه ک هم استایل قبول کنه و هم با دستورات php مشکل نداشته باشه ؟
NO1HAMID 2019-10-30 15:45:41
an_sama 2019-10-30 15:43:16
سلام عصر بخیر، دوستان کسی واسه pdf پکیجی میشناسه ک هم استایل قبول کنه و هم با دستورات php مشکل نداشته باشه ؟

Hey bro, this is English group. Pls ask your question in English.

an_sama 2019-10-30 15:47:34
NO1HAMID 2019-10-30 15:45:41
Hey bro, this is English group. Pls ask your question in English.

Sorry🙏

behzadaminnima 2019-10-30 16:30:13
an_sama 2019-10-30 15:43:16
سلام عصر بخیر، دوستان کسی واسه pdf پکیجی میشناسه ک هم استایل قبول کنه و هم با دستورات php مشکل نداشته باشه ؟

☺️

Sid 2019-10-30 17:07:39
I have created YouTube channel to support beginners and advance level developer
Can you give one subscriber😊
https://youtube.com/c/Realprogrammer
2019-10-30 19:29:42
Sid 2019-10-30 17:07:39
I have created YouTube channel to support beginners and advance level developer
Can you give one subscriber😊
https://youtube.com/c/Realprogrammer

en english 🤔?

2019-10-30 19:48:58
i have 2 tables, users and tests with relationship between them. I need to get all users that didn’t take test this month but it doesn’t work. My query looks like this

User::where(‘role_id’, ‘3’)
->where(‘operational_team’, ‘1’)
->with([‘test’ => function ($query) {
$query->whereMonth(‘created_at’,’!=’, Carbon::now()->month + 1);
}])
->get();

2019-10-30 19:49:25
in debugger it shows as 2 queries:
select * from users where role_id = ‘3’ and operational_team = ‘1’

select * from user_tests where user_tests.user_id in (103, 104, 105, 106, 109, 111, 113, 114, 116, 118, 120, 126, 127, 130, 133, 147, 148, 153, 159, 161, 162, 163, 164, 169, 174, 180, 182, 184, 185, 186, 187, 188, 189, 192, 196) and month(`created_at`) != 11

2019-10-30 19:49:37
have any idea why?
2019-10-30 19:55:47
hmm. so how should it look like?
2019-10-30 19:56:03
raw query might look like this “select * from users as u left join user_tests as t ON u.id = t.user_id where u.role_id = ‘3’ and u.operational_team = ‘1’ and month(t.created_at) = 10”
2019-10-30 19:56:35
it give me 22 results. In first query it give me 35 result (all users)
2019-10-30 19:57:04
I wanted to use User:: format… but i am missing something
2019-10-30 20:00:52
Thanks @Samuel
2019-10-30 20:04:54
really?
2019-10-30 20:05:09
ok, i didn’t know
ikudratov 2019-10-30 20:10:07
hi people
How to validate a spaces which is present in my login?
ikudratov 2019-10-30 20:10:50
I need validate my login!
ikudratov 2019-10-30 20:11:33
It should not appear a spaces
ikudratov 2019-10-30 20:12:10
Ok, if the space is in the middle of the string?
ikudratov 2019-10-30 20:13:39
I mean something link this “required|without_space”
ikudratov 2019-10-30 20:17:07
Ok, let me try, thank you!
ikudratov 2019-10-30 20:23:32
‘login’ => ‘required|string|regex:/^[\s]+$/u’
rebory 2019-10-30 20:23:51
I have little question , when i save an array to to database using implode function how to explode in laravel blade
ikudratov 2019-10-30 20:25:11
Yep
rebory 2019-10-30 20:26:10
241 user online but no buddy intrusted to reply
rebory 2019-10-30 20:32:40
I do it but i face error like suppose edit an blog crud and we are also send $blog in edit blade in php tag it show error when i write this same code
rebory 2019-10-30 20:34:06
Wait i show u in example
rebory 2019-10-30 20:37:56
laravel_discuss-16621.jpg

Lukasss93 2019-10-30 20:42:23
rebory 2019-10-30 20:37:56

maybe you can simplify it:
public function viewProfile()
{
return view(‘hotel_admin.tasks.hotel.profile’, [
‘hotel’=>Auth::user()->hotels
]);
}

rebory 2019-10-30 20:50:18
laravel_discuss-16623.jpg

rebory 2019-10-30 20:52:17
Lukasss93 2019-10-30 20:42:23
maybe you can simplify it:
public function viewProfile()
{
return view(‘hotel_admin.tasks.hotel.profile’, [
‘hotel’=>Auth::user()->hotels
]);
}

i know but i’m much satisfy with my code style

Lukasss93 2019-10-30 20:53:02
rebory 2019-10-30 20:52:17
i know but i’m much satisfy with my code style

ok, we are in a free world

Lukasss93 2019-10-30 20:54:33
+1
rebory 2019-10-30 21:00:54
actually i recieve this array from multiselect checkbox dropdown and save using implode , and then i edit record i need this as array selected values in multidropdown that was single reasons to explode this value in blade
rebory 2019-10-30 21:05:17
my english is my weekpoint, mostly i have no word to explain my issue properly.
rebory 2019-10-30 21:05:33
yes $hotel iis model
rebory 2019-10-30 21:08:39
no i have a multi dropdown with checkbox
rebory 2019-10-30 21:09:06
this drop down name is name=”services[]”
rebory 2019-10-30 21:10:27
i think it but after change my mind
rebory 2019-10-30 21:11:26
that is my question why model variable not work inside php tag
rebory 2019-10-30 21:12:03
yes $hotel is undefiend variable only inside php tag
rebory 2019-10-30 21:12:52
if i direct echo {{ $hotel->services }} result is : abc,def,ghi
rebory 2019-10-30 21:13:45
i already dd show same data on dd , data is abc,def,ghi
rebory 2019-10-30 21:14:03
5.8
rebory 2019-10-30 21:17:53
@php $var = explode(” ” ,$hotel->services);
rebory 2019-10-30 21:18:27
i used it
rebory 2019-10-30 21:18:58
where i wrong
|