How can I get parameters in contoller using query string in route?

|
akmalsulaymonov 2020-05-11 08:26:06
Hi friends. How can I get parameters in contoller using query string in route?
Ex: www.example.com/service.php?login=1111&password=2222&type=3
akmalsulaymonov 2020-05-11 08:26:53
Route::get(‘/service’, ‘ApiController@services’);
akmalsulaymonov 2020-05-11 08:27:18
public function services(Request $request)
{
$input = $request->all();

print_r($input);
}

akmalsulaymonov 2020-05-11 08:27:36
getting error
Asish K Antony 2020-05-11 08:28:51
First of all dont pass passwords like that always use POST
akmalsulaymonov 2020-05-11 08:29:05
I know, it is example
akmalsulaymonov 2020-05-11 08:29:45
changed to service.php
Asish K Antony 2020-05-11 08:30:56
in Laravel the url will not be like this
Asish K Antony 2020-05-11 08:31:15
there will not be .php extensions to your routes
akmalsulaymonov 2020-05-11 08:35:03
is there any solution with .php ? )
Asish K Antony 2020-05-11 08:38:30
from where are you getting that url???
akmalsulaymonov 2020-05-11 08:41:30
i found solution. thanks
akmalsulaymonov 2020-05-11 08:41:51
Route::get(‘/service.php’, ‘ApiController@services’);
flyingdragons 2020-05-11 08:43:21
skys215 2020-05-11 07:52:22
What do you mean doesn’t work?

Mean it was throwing This Site can’t be reached

flyingdragons 2020-05-11 08:43:36
laravel_discuss-36826.jpg

skys215 2020-05-11 08:50:10
so it’s your network problem
skys215 2020-05-11 08:50:16
try use vpn to access
ddnnaaae 2020-05-11 09:40:45
flyingdragons 2020-05-11 06:49:45
Please check out my article on it.

Hello, thank you. i found out that it could be an nginx misconfiguration. i have to check it again. with artisan serve the page is shown correctly

Netking1 2020-05-11 09:47:34
I doubt he is even using laravel
flyingdragons 2020-05-11 11:27:53
ddnnaaae 2020-05-11 09:40:45
Hello, thank you. i found out that it could be an nginx misconfiguration. i have to check it again. with artisan serve the page is shown correctly

Awesome. Good to know that you got it working

ddnnaaae 2020-05-11 11:28:32
It Is still not working with nginx πŸ™
ddnnaaae 2020-05-11 11:28:42
Only with the artisan serve
ddnnaaae 2020-05-11 11:29:17
But i don’t know why..maybe i am lacking some config
ddnnaaae 2020-05-11 11:29:54
The php pages outside laravel work correctly
KashanSmartCity 2020-05-11 11:49:03
https://meet.jit.si/iran

Jitsi Meetmeet.jit.si
Join a WebRTC video conference powered by the Jitsi Videobridge
flyingdragons 2020-05-11 12:00:47
ddnnaaae 2020-05-11 11:29:54
The php pages outside laravel work correctly

It’s because you have not enabled the site configuration

flyingdragons 2020-05-11 12:01:06
The default configuration is working because of which you get this wrror
flyingdragons 2020-05-11 12:01:10
Error*
flyingdragons 2020-05-11 12:02:40
https://stackcoder.in/posts/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu
How To Install Linux, NGINX, MYSQL, PHP (LEMP Stack) on Ubuntu

Install Linux, NGINX, MYSQL, PHP (LEMP Stack) on Ubuntu | StackCoderStackCoder
Hi, friends this tutorial you will learn how to install, configure and testing LEMP (NGINX, MySQL, and PHP) stack on an Ubuntu 18.04 server.
flyingdragons 2020-05-11 12:02:59
Please use the above tutorial to know more on your configuration settings
flyingdragons 2020-05-11 12:03:47
https://stackcoder.in/posts/how-to-install-nginx-in-linux-ubuntu-package-manager-manage-it
How To Install NGINX In Linux / Ubuntu Package Manager & Manage It

How To Install NGINX In Linux / Ubuntu Package Manager & Manage It | StackCoderStackCoder
In this article, I will walk you through the NGINX installation process, and in management, you will learn how to check NGINX version, verbose output, test configuration, start, stop, restart & reload the NGINX configuration file.
flyingdragons 2020-05-11 12:04:30
flyingdragons 2020-05-11 12:03:47
https://stackcoder.in/posts/how-to-install-nginx-in-linux-ubuntu-package-manager-manage-it
How To Install NGINX In Linux / Ubuntu Package Manager & Manage It

You can also check this tutor on how to manage your nginx which will give you really good idea on who nginc works

prime 2020-05-11 12:05:21
Undefined index: product
prime 2020-05-11 12:05:40
when trying to access an array
flyingdragons 2020-05-11 12:07:43
Can you please post the code so that we can help you better
flyingdragons 2020-05-11 12:09:49
ddnnaaae 2020-05-11 11:29:54
The php pages outside laravel work correctly

Make sure to check if your config file is symbolically linked in /etc/nginx/sites-enabled

amosvictor97 2020-05-11 12:10:44
hello everyone.
I want to know if there is way i can merge all migrations into one file.For example, one migration file per table. my project is getting larger and i have a lot of migrations files
flyingdragons 2020-05-11 12:19:23
amosvictor97 2020-05-11 12:10:44
hello everyone.
I want to know if there is way i can merge all migrations into one file.For example, one migration file per table. my project is getting larger and i have a lot of migrations files

You can do it but as far as I am concerned I don’t go for it. If you want to go for micro service kind of architecture in future then please try to avoid

flyingdragons 2020-05-11 12:20:13
amosvictor97 2020-05-11 12:10:44
hello everyone.
I want to know if there is way i can merge all migrations into one file.For example, one migration file per table. my project is getting larger and i have a lot of migrations files

As you said your project is growing. 2 years back I was part of ERP team we had 420+ tables

flyingdragons 2020-05-11 12:21:04
And we were maintaining migrations seperately. The only difference is we were using Symfony framework back then
flyingdragons 2020-05-11 12:22:41
amosvictor97 2020-05-11 12:10:44
hello everyone.
I want to know if there is way i can merge all migrations into one file.For example, one migration file per table. my project is getting larger and i have a lot of migrations files

As you said your project is growing there might arise a thing to make it modular sooner or later.

What’s the number of tables you use in your project?

amosvictor97 2020-05-11 12:24:55
flyingdragons 2020-05-11 12:21:04
And we were maintaining migrations seperately. The only difference is we were using Symfony framework back then

in symfony it is easier to follows changes in tables or relations as we have an entity file

amosvictor97 2020-05-11 12:27:20
flyingdragons 2020-05-11 12:22:41
As you said your project is growing there might arise a thing to make it modular sooner or later.

What’s the number of tables you use in your project?

my problem is not the number of table but for example i have 6 to 7 migrations files for a single table. Sometimes i don’t know if this attribute still exist in my database or not and i have to check my migration files or directly in the database

flyingdragons 2020-05-11 12:27:58
Ah! Understand your pain now
amosvictor97 2020-05-11 12:28:33
flyingdragons 2020-05-11 12:27:58
Ah! Understand your pain now

Great πŸ˜…

flyingdragons 2020-05-11 12:30:58
amosvictor97 2020-05-11 12:27:20
my problem is not the number of table but for example i have 6 to 7 migrations files for a single table. Sometimes i don’t know if this attribute still exist in my database or not and i have to check my migration files or directly in the database

For time being, How about setting standards within your team and tell everyone to remove from attributes if they add new delete column migration

flyingdragons 2020-05-11 12:31:16
Let me also think on this as it’s very interesting.
amosvictor97 2020-05-11 12:33:20
flyingdragons 2020-05-11 12:30:58
For time being, How about setting standards within your team and tell everyone to remove from attributes if they add new delete column migration

Yes it is a good idea

prime 2020-05-11 12:34:16
Undefined index: fixture… when trying to access array
amosvictor97 2020-05-11 12:34:25
flyingdragons 2020-05-11 12:31:16
Let me also think on this as it’s very interesting.

I thought there was a package doing that

|