Как изменить имена полей на странице предварительного просмотра (/admin/user/{id}/show)?Php

Кемеровские программисты php общаются здесь
Ответить
Гость
 Как изменить имена полей на странице предварительного просмотра (/admin/user/{id}/show)?

Сообщение Гость »


I just installed Laravel Backpack Pro and added an isAdmin column to my Users column / model.
I've updated app/Http/Controllers/Admin/UserCrudController.php so that when editing a user and viewing the list of all users isAdmin shows up as Admin but how do I do that in the user preview page (

Код: Выделить всё

/admin/user/{id}/show
)?
For

Код: Выделить всё

/admin/user/{id}/edit
I modified

Код: Выделить всё

setupUpdateOperation()
to include this:

Код: Выделить всё

CRUD::field([
'name' => 'isAdmin',
'label' => 'Admin',
]);
For

Код: Выделить всё

/admin/user
I modified

Код: Выделить всё

setupListOperation()
to include this:

Код: Выделить всё

CRUD::column('isAdmin')->label('Admin');
But idk what function I'd need to modify to make the user preview page's behavior change. Initially I thought that

Код: Выделить всё

setupListOperation()
might do that page as well but, after modifying it, it turns out that that's not the case.
Any ideas?


Источник: https://stackoverflow.com/questions/780 ... er-id-show
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»