Closed robman2100 closed 3 years ago
@robman2100 Laravel 8 is supported since https://github.com/Okipa/laravel-table/releases/tag/3.0.0.
I'm pretty sure this has nothing to do with L8 support but may be related to your implementation.
The attribute default value is loaded here: https://github.com/Okipa/laravel-table/blob/master/src/Traits/Table/HasTemplates.php#L221
Your error is saying that this attribute has no value, this is why I suppose this error is related to your config file which may be incorrect. Please check with https://github.com/Okipa/laravel-table/blob/master/config/laravel-table.php.
Yes it is because laravel supports php 7.3 and up.. I have upgraded my environment to 7.4. This is where the error comes into play. I have the config in my Config folder and it looks exactly like what you have on that last link.
This is my Laravel-Tables config located in my config folder. `<?php
return [
/** Set the default classes for each part of the table. */
'classes' => [
'container' => ['table-responsive'],
'table' => ['table-borderless'],
'tr' => ['border-bottom'],
'th' => ['align-middle'],
'td' => ['align-middle'],
'results' => ['table-secondary'],
'disabled' => ['table-danger', 'disabled'],
],
/** Set all the action icons that are used on the table templates. */
'icon' => [
'rows_number' => '<i class="fas fa-list-ol"></i>',
'sort' => '<i class="fas fa-sort fa-fw"></i>',
'sort_asc' => '<i class="fas fa-sort-up fa-fw"></i>',
'sort_desc' => '<i class="fas fa-sort-down fa-fw"></i>',
'search' => '<i class="fas fa-search"></i>',
'validate' => '<i class="fas fa-check"></i>',
'info' => '<i class="fas fa-info-circle fa-fw"></i>',
'reset' => '<i class="fas fa-undo fa-fw"></i>',
'create' => '<i class="fas fa-plus-circle fa-fw "></i>',
'show' => '<i class="fas fa-eye fa-fw"></i>',
'edit' => '<i class="fas fa-edit fa-fw"></i>',
'destroy' => '<i class="fas fa-trash fa-fw"></i>',
],
/** Set the table default behavior. */
'behavior' => [
'rows_number' => 20,
'activate_rows_number_definition' => true,
],
/** Set the default view path for each component of the table. */
'template' => [
'table' => 'vendor.laravel-table.bootstrap.table',
'thead' => 'vendor.laravel-table.bootstrap.thead',
'rows_searching' => 'vendor.laravel-table.bootstrap.rows-searching',
'rows_number_definition' => 'vendor.laravel-table.bootstrap.rows-number-definition',
'create_action' => 'vendor.laravel-table.bootstrap.create-action',
'column_titles' => 'vendor.laravel-table.bootstrap.column-titles',
'tbody' => 'vendor.laravel-table.bootstrap.tbody',
'show_action' => 'vendor.laravel-table.bootstrap.show-action',
'edit_action' => 'vendor.laravel-table.bootstrap.edit-action',
'destroy_action' => 'vendor.laravel-table.bootstrap.destroy-action',
'results' => 'vendor.laravel-table.bootstrap.results',
'tfoot' => 'vendor.laravel-table.bootstrap.tfoot',
'navigation_status' => 'vendor.laravel-table.bootstrap.navigation-status',
'pagination' => 'vendor.laravel-table.bootstrap.pagination',
],
];`
It looks like it is not grabbing my config files.. But the config file exists.. Im not sure why it is doing this
I manually entered the config info direct. And it seems like it wants to work... but then I come back to gamedatas.view not found now.. not sure why it is creating a plural view on the end of my view. the route works and the view is for sure there. Definitly think your code is not setup for php 7.4
Well, this package requires PHP 7.4 and dropped support for earlier versions since V2. It is also running with 20+ PHP 7.4 production projects without any issue.
Did you try a fresh install on a new Laravel projet ?
I have upgraded my environment to 7.4.
=> you also should check your environment to make sure PHP 7.4 is actually running, this could be the source of your issue.
C:\xampp\htdocs\jindo\jindo>php -v PHP 7.4.10 (cli) (built: Sep 1 2020 16:52:39) ( ZTS Visual C++ 2017 x64 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
Both CLI And My Xampp are running 7.4
I am unsure why it is doing this.. I didnt upgrade my laravel project. It is a new project based off Laravel Auth() build.
And I am able to do manual tables ect and passing on the same view I try to initialize your Plugin.. Im bummed because I really wanted to use this.
Alright I have got it working now.. However I have a weird issue where it is showing #validation.attributes.MyColumName for the titles
I fixed it by assigning title. ->title('ID') Thanks!
I have the same issue how did you resolve the Typed property error ?
Can we get laravel 8 supported? This is why I ask and not sure if it has anything to do with it.. I am getting the following error.
Typed property Okipa\LaravelTable\Table::$tableTemplatePath must be string, null used
My Table
My Controller