A
A
Artur Boyko2019-01-05 02:49:30
Laravel
Artur Boyko, 2019-01-05 02:49:30

How to make a universal view for similar models?

There are similar models (users, admins and the like), is it possible to make a universal view for such models so as not to produce many blade files and use one?
How to pass column names and data for the editor table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jazzus, 2019-01-05
@jazzus

How to make a universal view? in one table. Each entity has its own table (so they say).
admins is better not to create. Because this is a user and you already have users.
It is better to make a roles table and place the admin role there and already assign the role to a specific user in the user_roles intermediate table with user_id and
fields .
Upload the migration to the database with the php artisan migrate command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question