They are 3 options to fetch why do i have to do it in a controller when i can do it in the view in one line?

|
Shubbb 2021-07-13 10:14:15
TheGuyi 2021-07-13 10:09:39
they are 3 options to fetch why do i have to do it in a controller when i can do it in the view in one line?

To follow best practices

Shubbb 2021-07-13 10:14:34
What error are you getting?
nagpal_ji 2021-07-13 10:15:08
any best Way To learn Laravel 8 except doc’s
TheGuyi 2021-07-13 10:15:09
Shubbb 2021-07-13 10:14:34
What error are you getting?

not getting an error the where clause isnt just returning the data i hope it would return

Shubbb 2021-07-13 10:15:25
In where try removing [ ]
Shubbb 2021-07-13 10:15:36
Just pass vlaues comma separated
TheGuyi 2021-07-13 10:15:41
Shubbb 2021-07-13 10:14:34
What error are you getting?

this is what i am trying to archieve (SELECT * FROM employee_livewire.departments where class = ‘rej_reason’;)

TheGuyi 2021-07-13 10:17:04
Shubbb 2021-07-13 10:15:36
Just pass vlaues comma separated

the options are fed into the db by another application and they keep changing but they are 3 options at all times so when they change they cant be picked up

Shubbb 2021-07-13 10:17:46
What I am saying that you are passing array to where method
TheGuyi 2021-07-13 10:19:44
Shubbb 2021-07-13 10:17:46
What I am saying that you are passing array to where method

laravel_discuss-88062.jpg
some one help me archieve this please (SELECT * FROM employee_livewire.departments where class = ‘rej_reason’;)

Shubbb 2021-07-13 10:20:17
Lol do you understand array?
Shubbb 2021-07-13 10:21:05
chnage to this
where(‘class’,’=’,’rej_reason’)
TheGuyi 2021-07-13 10:24:19
Shubbb 2021-07-13 10:21:05
chnage to this
where(‘class’,’=’,’rej_reason’)

laravel_discuss-88065.jpg
done but no difference

TheGuyi 2021-07-13 10:48:01
laravel_discuss-88066.jpg
found the mistake i was missing the all() …lol took me 24 hours to see that.lol
jimmy Shukurov 2021-07-13 11:01:24
laravel_discuss-88068.jpg
Anyone can help me with this?
Shubbb 2021-07-13 12:27:28
TheGuyi 2021-07-13 10:48:01
found the mistake i was missing the all() …lol took me 24 hours to see that.lol

If you would have done this in controller, it would be easy to debug.

thekiharani 2021-07-13 12:34:46
When mixing Bootstrap and TailwindCSS (for some reasons), which one should override the other?
TheGuyi 2021-07-13 12:34:48
Shubbb 2021-07-13 12:27:28
If you would have done this in controller, it would be easy to debug.

Again One line much easier than a whole controller to pull 3 options

Shubbb 2021-07-13 12:35:31
TheGuyi 2021-07-13 12:34:48
Again One line much easier than a whole controller to pull 3 options

No offense๐Ÿ™Œ

Yogi 2021-07-13 13:09:39
any one here has integrated laravel with oracle database using oci8 yajra package on ubuntu?
TheGuyi 2021-07-13 13:10:55
Shubbb 2021-07-13 12:35:31
No offense๐Ÿ™Œ

None taken, I do use controllers for large amounts of data. I understand your point very well

Shubbb 2021-07-13 13:12:33
TheGuyi 2021-07-13 13:10:55
None taken, I do use controllers for large amounts of data. I understand your point very well

Keeping design patterns standardized helps maintaining and debugging code efficiently

Rashid 2021-07-13 13:28:08
any vue js developers here
2021-07-13 14:14:23
Uttam_hansora 2021-07-13 09:56:07
Hello please help
How to set remember me in cookie

You might want to try Auth::attempt()

2021-07-13 14:30:14
hello everyone, please ask vue combined with api or web?๐Ÿ˜”
2021-07-13 14:30:33
I am learning VUE
natghi2010 2021-07-13 14:35:07
2021-07-13 14:30:14
hello everyone, please ask vue combined with api or web?๐Ÿ˜”

better api

PradeepRathour700 2021-07-13 15:57:06
How to display all data with categories: [1, 2, 4] in postman ..???
Relaxed Guy 2021-07-13 16:03:40
2021-07-13 14:30:14
hello everyone, please ask vue combined with api or web?๐Ÿ˜”

API

Sunil Negi 2021-07-13 16:14:46
Hii ek help chaiye thi
Laraval 5.8 mai ek project build h already mai usmai vue js kese add kru ?
Mane bhaut try krke dekha but nmp run dev compiled tho ho jaa rha h but output nhi aa rha h please koi ho jisne kiya ho ye
ProAbdulrahman 2021-07-13 16:27:18
if i deleted middlewate, route work
ProAbdulrahman 2021-07-13 16:30:33
laravel_discuss-88091.jpg

shashinv 2021-07-13 17:09:38
TheGuyi 2021-07-13 10:48:01
found the mistake i was missing the all() …lol took me 24 hours to see that.lol

i think that is no good way to extract data, i prefer pass just a variable to front and not all query

Rakesh Soni 2021-07-13 18:09:50
ProAbdulrahman 2021-07-13 16:30:33

Route::get(‘your-url’, [YourController::class, ‘your-method’]);

2021-07-13 19:53:44
Okay
|