Why did you decide seperate your users to different tables?

|
zack6849 2019-07-20 11:43:59
No the db schema
zack6849 2019-07-20 11:44:03
Not the html table
zack6849 2019-07-20 11:45:18
Your best bet is probably to define a user relationship to the abstraks and a belongsto user relation in the abstrak
zack6849 2019-07-20 11:45:30
Then you could do $user->abstraks or something like that
2019-07-20 11:45:43
laravel_discuss-9660.jpg

2019-07-20 11:48:59
zack6849 2019-07-20 11:45:18
Your best bet is probably to define a user relationship to the abstraks and a belongsto user relation in the abstrak

laravel_discuss-9661.jpg

2019-07-20 11:49:17
I did it, this is my relation
zack6849 2019-07-20 11:49:55
Then make abstraks in your controller reference Auth:: getUser()->abstraks
zack6849 2019-07-20 11:50:10
That should only give you the users abstraks so you’d be good afaik
zack6849 2019-07-20 11:52:50
Lmk if it worked
2019-07-20 11:54:50
zack6849 2019-07-20 11:49:55
Then make abstraks in your controller reference Auth:: getUser()->abstraks

I don’t know how to do that

mhd_arffnn 2019-07-20 13:09:57
my queue:listen works well, and then now its not working, after sometime its freezing, no code changes, in log also dont have any error
mhd_arffnn 2019-07-20 13:10:43
why this happen? anyone experience this
Prakash D 2019-07-20 13:11:56
laravel_discuss-9669.jpg

Prakash D 2019-07-20 13:12:19
What is this error and how I clear it can u explain me
Prakash D 2019-07-20 13:12:30
Anyone
oxbir 2019-07-20 13:17:26
How to login with only mobile number
vasanthamohan 2019-07-20 13:20:50
The get method is not supported for this route supported methods are post
vasanthamohan 2019-07-20 13:21:07
But I am using post route
vasanthamohan 2019-07-20 13:21:32
And in form also using post
2019-07-20 13:43:56
zack6849 2019-07-20 11:52:50
Lmk if it worked

I found my solution by doing this:
public function show()
{
$abstraks = Abstrak::whereUserId(auth()->user()->id)->get();
return view(‘abstrak.status’, compact(‘abstraks’));
}

Thank U 4 U’r response btw

isnopitag 2019-07-20 17:25:49
Harrisdtt 2019-07-20 08:08:51
With beanstalkd

Oh Sorry I have neer worked out with that, but I will investigate

joseph_ayuk 2019-07-20 17:51:42
sotheast 2019-07-19 09:25:49
Hello Guys! Can i install laravel using wamp?

If you don’t have php installed, you can install wamp which will automatically php for you. make sure you have the latest version of wamp. After you can now install composer and that’s it. you can install laravel with composer and move on

joseph_ayuk 2019-07-20 17:53:06
MrAbdurakhmonKurbanov 2019-07-19 16:39:47
Does laravel work on php7? Who is work it

Go the laravel website and check the documentation for the version of laravel you want to use. I think laravel 5.8 is compatible with versions of php greater than 7

joseph_ayuk 2019-07-20 17:53:25
joseph_ayuk 2019-07-20 17:53:06
Go the laravel website and check the documentation for the version of laravel you want to use. I think laravel 5.8 is compatible with versions of php greater than 7

*php version 7.1.3

2019-07-20 17:53:31
Is somebody here from Canada?
joseph_ayuk 2019-07-20 17:55:01
sotheast 2019-07-18 23:02:30
When create new project run on shell cmd not working ?

Make sure php is installed and the version is compatible with the version of laravel you want to use. Then make sure you install compser so that it uses the version of php you have installed

joseph_ayuk 2019-07-20 17:59:42
Hello guys, this is an issue i have been pondering on for days. I have a system that has the following users: doctors, patients , nurses and admins all in different tables. I want to create a login logic that uses these different tables with the same controller and same login form so that based on the information entered on the login form, the Controller logic can check if the credentials are for a nurse or a doctor or an admin and redirect to the respective controller
joseph_ayuk 2019-07-20 18:00:02
Any blog, website or tip will be of help
joseph_ayuk 2019-07-20 18:01:57
I am capable of having seperate login urls, controller, and controller auth for each table but I don’t know how to merge the logic
acrossoffwest 2019-07-20 18:04:57
joseph_ayuk 2019-07-20 18:01:57
I am capable of having seperate login urls, controller, and controller auth for each table but I don’t know how to merge the logic

Do you wana do login by single url?

acrossoffwest 2019-07-20 18:06:05
Why did you decide seperate your users to different tables?
joseph_ayuk 2019-07-20 18:08:04
acrossoffwest 2019-07-20 18:04:57
Do you wana do login by single url?

yeah

acrossoffwest 2019-07-20 18:08:07
joseph_ayuk 2019-07-20 17:59:42
Hello guys, this is an issue i have been pondering on for days. I have a system that has the following users: doctors, patients , nurses and admins all in different tables. I want to create a login logic that uses these different tables with the same controller and same login form so that based on the information entered on the login form, the Controller logic can check if the credentials are for a nurse or a doctor or an admin and redirect to the respective controller

Just create one middleware controller and check incoming data

acrossoffwest 2019-07-20 18:08:53
After call necessary Controller
joseph_ayuk 2019-07-20 18:08:54
acrossoffwest 2019-07-20 18:06:05
Why did you decide seperate your users to different tables?

Trust me that was the best option based on the functional requirements of the application.

joseph_ayuk 2019-07-20 18:09:50
acrossoffwest 2019-07-20 18:08:07
Just create one middleware controller and check incoming data

That is what I am asking. How do i take into consideration the guards, the middlewares and all the rest

acrossoffwest 2019-07-20 18:10:07
Hm, you could create one users table and save here auth data, and extra data of users you can store on other tables
acrossoffwest 2019-07-20 18:11:57
How do your users authentication?
joseph_ayuk 2019-07-20 18:12:17
acrossoffwest 2019-07-20 18:10:07
Hm, you could create one users table and save here auth data, and extra data of users you can store on other tables

Isn’t that going to mess up the whole process?

joseph_ayuk 2019-07-20 18:12:50
How do you define the relationship between users and doctors, nurses, admins, patients etc ?
acrossoffwest 2019-07-20 18:13:00
joseph_ayuk 2019-07-20 18:12:17
Isn’t that going to mess up the whole process?

How? I did’t see problems in this decision.

acrossoffwest 2019-07-20 18:14:03
By user_id in those tables
acrossoffwest 2019-07-20 18:14:12
No?
acrossoffwest 2019-07-20 18:14:54
Is it no safety?
joseph_ayuk 2019-07-20 18:15:30
Ok if i understand, each of those tables will have the user_id right?
acrossoffwest 2019-07-20 18:15:38
Yeah
acrossoffwest 2019-07-20 18:15:58
It is simple one to one relationship
joseph_ayuk 2019-07-20 18:16:25
and after authentication, i can retrieve the persons information by querying where the user_id is present in those table?
acrossoffwest 2019-07-20 18:17:07
Yeap
|