Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Orchid\Screens\Clear;
- use App\Models\Clear\ClearSample;
- use App\Orchid\Layouts\Clear\ClearSampleShowLayout;
- use Orchid\Screen\Screen;
- class ClearSampleShowScreen extends Screen
- {
- public $name = 'Clear Sample';
- public $description = 'View Clear Sample';
- public function query(ClearSample $clearSample): array
- {
- $clearSample->load(['publishers', 'labels', 'writers']);
- return [
- 'clear_sample' => $clearSample //Получаю ошибку Call to a member function getContent() on bool но если оберну в [$clearSample] то один объект приходит как массив но ошибку не получаю
- ];
- }
- public function commandBar(): array
- {
- return [];
- }
- public function layout(): array
- {
- return [
- ClearSampleShowLayout::class
- ];
- }
- }
- ?>
- <?php
- namespace App\Orchid\Layouts\Clear;
- use Orchid\Screen\Layouts\Table;
- use Orchid\Screen\TD;
- class ClearSampleShowLayout extends Table
- {
- protected $target = 'clear_sample';
- protected function columns(): array
- {
- return [
- TD::set('artist_name', __('Name')) //Получаю ошибку Call to a member function getContent() on bool
- ];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement