Is the file there?

|
Marvixino 2019-04-30 08:26:26
Is the file there? What is the error message?
vasanthamohan 2019-04-30 08:39:02
Do anyone have idea about dynamically customisable organisation chart?
htoowaikhant 2019-04-30 08:43:04
Marvixino 2019-04-30 08:26:26
Is the file there? What is the error message?

laravel_discuss-5483.jpg

htoowaikhant 2019-04-30 08:43:41
i also try composer dump , config:cache
htoowaikhant 2019-04-30 08:43:45
but nothing effect
loveycom 2019-04-30 08:48:25
Marvixino 2019-04-30 07:29:59
But this not a good practice, user always need to login, and jwt should not remain valid for long time

What is not a good practice? Register and get logged in? Can you point me to where it is stated?

Also, I did not say that my token does not expire. I wrote the api for a state (Lagos state, Nigeria). The token expires every 6hrs. As they resume in the morning and initiate a login, they have access to the server through the api till 2pm or so depending on the time they login and if they want to do more, they should relogin.

This is what best fit the situation I am trying to solve with my case.

loveycom 2019-04-30 08:50:04
In your case, all is fine except that you put refresh token route inside Auth middleware. If you want to use refresh token which is totally unnecessary, refresh token route should be placed where you put login and register routes.
loveycom 2019-04-30 08:53:36
htoowaikhant 2019-04-30 08:43:04

Can you share your directory structure? Also, where on the server did you put public folder and remaining folders? Finally, what is the content of index.php?

Marvixino 2019-04-30 09:04:34
loveycom 2019-04-30 08:48:25
What is not a good practice? Register and get logged in? Can you point me to where it is stated?

Also, I did not say that my token does not expire. I wrote the api for a state (Lagos state, Nigeria). The token expires every 6hrs. As they resume in the morning and initiate a login, they have access to the server through the api till 2pm or so depending on the time they login and if they want to do more, they should relogin.

This is what best fit the situation I am trying to solve with my case.

The user should login again each 6 hours, if API is used for mobile app then the user will not use such, I know this better for security.
What will you do if the telegram asksfor credentials after each 6 hours

loveycom 2019-04-30 09:16:47
Marvixino 2019-04-30 09:04:34
The user should login again each 6 hours, if API is used for mobile app then the user will not use such, I know this better for security.
What will you do if the telegram asksfor credentials after each 6 hours

Did you read the part I said this is what best fit my situation. I need them to login

Marvixino 2019-04-30 10:57:41
loveycom 2019-04-30 09:16:47
Did you read the part I said this is what best fit my situation. I need them to login

Got you mate, but in my case the goal is mobile app, that is why I need the refresh token

loveycom 2019-04-30 11:00:32
Marvixino 2019-04-30 10:57:41
Got you mate, but in my case the goal is mobile app, that is why I need the refresh token

Ok

loveycom 2019-04-30 11:00:57
Did you do what I suggested?
Marvixino 2019-04-30 21:56:59
What is the “the-refresh-token” here, and how to get it?
Marvixino 2019-04-30 21:57:02
laravel_discuss-5498.jpg

Marvixino 2019-04-30 22:04:57
loveycom 2019-04-30 11:00:57
Did you do what I suggested?

Yes, didn’t work, the docs showing this way, but missing more details.

2019-04-30 22:39:21
Marvixino 2019-04-30 21:56:59
What is the “the-refresh-token” here, and how to get it?

Shouldn‘t that be provided?

Marvixino 2019-04-30 22:39:31
I found the right function to renew the JWT from the refresh token, yet I do not know how to use when the JWT expires.

public function refreshToken(Request $request){
$http = new GuzzleHttpClient;

$response = $http->post(config(‘services.passport.login_endpoint’), [
‘form_params’ => [
‘grant_type’ => ‘refresh_token’,
‘refresh_token’ => $request->get(‘refresh_token’),
‘client_id’ => config(‘services.passport.client_id’),
‘client_secret’ => config(‘services.passport.client_secret’),
],
]);

return json_decode((string) $response->getBody(), true);
}

loveycom 2019-05-01 08:47:44
I will look into this soon. I will run a test. I hope you are using passport
kv_sanjay 2019-05-01 17:32:53
Hai, any one know any package to convert html page to pdf
aslamdoctor 2019-05-01 19:44:34
fpdf
Testuserid 2019-05-01 19:48:01
kv_sanjay 2019-05-01 17:32:53
Hai, any one know any package to convert html page to pdf

https://github.com/barryvdh/laravel-snappy

GitHub – barryvdh/laravel-snappy: Laravel Snappy PDFGitHub
Laravel Snappy PDF. Contribute to barryvdh/laravel-snappy development by creating an account on GitHub.
kv_sanjay 2019-05-01 20:29:08
Thanks guys
StanleyMasinde 2019-05-01 20:33:31
kv_sanjay 2019-05-01 17:32:53
Hai, any one know any package to convert html page to pdf

There are a lot of packages. But creating pdfs in the backend is not perfomance friendly. I prefer doing that with JavaScript

DivByZero 2019-05-02 10:49:49
another stupid VAS shit
Holylight1977 2019-05-02 11:51:33
laravel_discuss-5518.jpg
🔥 این عالیییییه 😁😁
ldefra 2019-05-02 17:31:36
hi guys, i’have a question…i’m doing a menu manager for restaurants and pizzerias… how would you handle issue of married pizza (half pizza in a way and half in another way) in to database? how would your manage the relation beetween order and products(pizza)?
ldefra 2019-05-02 17:32:26
if it is not clear, i repeat better
SkipperStrange 2019-05-02 19:25:57
So ive created this controller, added route etc and i dont get any erros. problem is its when i go to any of the urls, only a blank page loads and i get a status code of 200.
SkipperStrange 2019-05-02 19:27:26
Even when i intentionally trigger an error with the controller i get blank page and status cod 200
SkipperStrange 2019-05-02 19:27:34
Please help
SkipperStrange 2019-05-02 19:31:24
laravel_discuss-5529.jpg
Line 28-29 are the new controller routes
SkipperStrange 2019-05-02 19:33:59
laravel_discuss-5530.jpg
This is the controller file itself with all the methods in the route
SkipperStrange 2019-05-02 19:34:39
laravel_discuss-5531.jpg
This is what i get
DesolatorMagno 2019-05-02 19:35:08
You tried doing logs in each controller?
SkipperStrange 2019-05-02 19:35:13
I even deleted the contents of the controller file and still same
DesolatorMagno 2019-05-02 19:35:43
To check that you are going into the controller.
SkipperStrange 2019-05-02 19:36:08
DesolatorMagno 2019-05-02 19:35:43
To check that you are going into the controller.

I get an error when the controller file doesn’t exist

DesolatorMagno 2019-05-02 19:36:16
You can do s** there but if it don’t enter into the controller then nothing will happen.
DesolatorMagno 2019-05-02 19:36:52
SkipperStrange 2019-05-02 19:36:08
I get an error when the controller file doesn’t exist

Is to check it is entering the correct function inside the correct controller

SkipperStrange 2019-05-02 19:37:18
Ok
DesolatorMagno 2019-05-02 19:37:54
Something like “inside x function” is enough.
DesolatorMagno 2019-05-02 19:38:32
I am assuming you know how to log and search for those.
SkipperStrange 2019-05-02 19:38:37
I did write a callback function at the route to return a view and still same tesults
SkipperStrange 2019-05-02 19:38:57
DesolatorMagno 2019-05-02 19:38:32
I am assuming you know how to log and search for those.

Yh

DesolatorMagno 2019-05-02 19:40:58
Yes yes, but is entering the right place? XD

That is the basic thing to search because one of the things that could happen is that you are writing bad the routes in a way that b route get inside of route a.

SkipperStrange 2019-05-02 19:41:48
DesolatorMagno 2019-05-02 19:40:58
Yes yes, but is entering the right place? XD

That is the basic thing to search because one of the things that could happen is that you are writing bad the routes in a way that b route get inside of route a.

Looked through all the routes

DesolatorMagno 2019-05-02 19:42:30
Example

User/{Id}
User/list

you will never enter into that second route.

DesolatorMagno 2019-05-02 19:43:52
And what I can see those routes suck.
DesolatorMagno 2019-05-02 19:44:22
You don’t write delete, you use the route type delete.
|