Harings Rob
09/07/2022, 8:21 AMHarings Rob
09/07/2022, 8:21 AMthingasd
09/07/2022, 8:43 AMmateoD
09/07/2022, 1:05 PMprotected $indexColumns = [
'services' => [ // relation column
'title' => 'Services',
'relationship' => 'services',
'field' => 'title',
],
];
Shiftless
09/07/2022, 8:53 PMmateoD
09/07/2022, 9:39 PMShiftless
09/07/2022, 10:43 PMMedvedOurs
09/08/2022, 9:23 AMwindow.TWILL.STORE.config is undefined
Any idea?dedli
09/08/2022, 9:33 AMifox
09/08/2022, 9:57 AMHarings Rob
09/08/2022, 10:08 AMdedli
09/08/2022, 11:14 AMin my PersonalCategoriesPersonalPagesController:
protected $moduleName = 'personalCategories.personalPages';
protected $modelName = 'PersonalPage';
protected $previewView = 'page.show';
```
And I can see all previous revisions and can preview it. My problem only when I try to restore one of my revisions. Maybe problem is that this modules live inside admin menu item "category"? And I have two questions sign in url /admin/category/personalCategories/personalPages/restoreRevision/14?personalCategory=2&personalPage=14?revisionId=2925Sami
09/08/2022, 12:31 PM\A17\Twill\Models\Enums\UserRole.php
and use App\Models\Enums\UserRole
My composer.json
autoload config:
json
"autoload": {
"files": ["app/Models/Enums/UserRole.php"],
"exclude-from-classmap": ["vendor/area17/twill/src/Models/Enums/UserRole.php"],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"files": ["app/Models/Enums/UserRole.php"],
"exclude-from-classmap": ["vendor/area17/twill/src/Models/Enums/UserRole.php"],
"psr-4": {
"Tests\\": "tests/"
}
},
and result in `composer.lock`:
json
"autoload": {
"psr-4": {
"A17\\Twill\\": "src/"
}
},
I don't know what I'm doing wrong here 😅kalle
09/08/2022, 12:34 PMcomposer dump
it will recreate the autoload files.Sami
09/08/2022, 12:36 PMNo static method or enum constant 'PLEB' in class A17\Twill\Models\Enums\UserRole
. Also composer.lock stays the samekalle
09/08/2022, 12:45 PMapp/Models/Enums/UserRole.php
is not loaded. Do you have this file in your project?
I have the same use case in my current project and its same as yours (only I load file after psr-4
key) and its working fine.
Which Twill version do you use?Sami
09/08/2022, 12:47 PMkalle
09/08/2022, 12:56 PMphp
use App\Models\Enums\UserRole as CustomRole;
use A17\Twill\Models\Enums\UserRole;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->bind(UserRole::class, CustomRole::class);
}
Sami
09/08/2022, 1:01 PMdedli
09/08/2022, 4:04 PMHarings Rob
09/09/2022, 7:35 AMdedli
09/09/2022, 8:28 AMMentally
09/09/2022, 9:50 AMifox
09/09/2022, 9:59 AMifox
09/09/2022, 10:05 AMHarings Rob
09/09/2022, 10:15 AMHarings Rob
09/09/2022, 10:17 AMTwillNavigation::addLink(MyCustomLinkComponent::make()->...)
delta107
09/10/2022, 12:42 PMdelta107
09/10/2022, 12:46 PM