leftblank
08/05/2021, 4:58 PMpboivin
08/05/2021, 5:31 PMleftblank
08/05/2021, 5:37 PMleftblank
08/05/2021, 5:37 PM$browsers property which works via BelongsTo, that lets me select one Brand, which updates the Product's brand_id field. I thought it would be nice to allow the client to work in the other direction too, and use a browser within the Brand to select which Products it owns via the HasMany relationship.leftblank
08/05/2021, 5:39 PMleftblank
08/05/2021, 5:42 PMpboivin
08/05/2021, 5:43 PMleftblank
08/05/2021, 5:44 PMpboivin
08/05/2021, 5:46 PMleftblank
08/05/2021, 5:47 PMpboivin
08/05/2021, 5:48 PMbelongsToMany, but you may be right about `belongsTo`/`hasMany`, there could be something missing to make this work 2-way.leftblank
08/05/2021, 5:49 PMifox
08/05/2021, 5:55 PMleftblank
08/05/2021, 5:58 PMleftblank
08/05/2021, 5:58 PMifox
08/05/2021, 11:34 PMleftblank
08/06/2021, 2:30 PMHandleRevisions on a module with a browser powered by a BelongsTo relationship, and i'm getting an error when clicking 'Preview changes' in the Twill UI under the Revisions details. The log shows the following:leftblank
08/06/2021, 2:30 PM[2021-08-06 11:43:54] local.ERROR: Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::getTable() {"userId":1,"exception":"[object] (BadMethodCallException(code: 0): Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsTo::getTable() at /Users.../vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50)
[stacktrace]
#0 /Users.../vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(36): Illuminate\\Database\\Eloquent\\Relations\\Relation::throwBadMethodCallException('getTable')
#1 /Users.../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php(439): Illuminate\\Database\\Eloquent\\Relations\\Relation->forwardCallTo(Object(Illuminate\\Database\\Eloquent\\Builder), 'getTable', Array)
#2 /Users.../vendor/area17/twill/src/Repositories/Behaviors/HandleRevisions.php(102): Illuminate\\Database\\Eloquent\\Relations\\Relation->__call('getTable', Array)pablobarrios
08/06/2021, 2:42 PMdev branch.
Would you like to give it a try?leftblank
08/06/2021, 2:43 PMleftblank
08/06/2021, 2:46 PMpablobarrios
08/06/2021, 2:52 PM2.x is the oneleftblank
08/06/2021, 2:58 PMKyleAF
08/07/2021, 7:46 PMCannot drop table 'users' referenced by a foreign key constraint 'page_revisions_user_id_foreign' on table 'page_revisions'
Any recommendations on how to tackle this? For now I've just updated twill's vendor migration to fix it, but that's obviously not ideal, lol. Is there perhaps a way I can selectively have a vendor migration NOT run?ifox
08/07/2021, 8:40 PMtwill.users_table to users?ifox
08/07/2021, 8:41 PMKyleAF
08/07/2021, 8:43 PMleftblank
08/09/2021, 9:19 AMdev worked, thank youleftblank
08/09/2021, 9:50 AM