pboivin
03/15/2022, 2:42 PMrelated table. But you can if you refactor to a pivot table like in the tutorial above ^Kormi
03/15/2022, 2:42 PMKormi
03/15/2022, 2:43 PMKormi
03/15/2022, 2:48 PMpboivin
03/15/2022, 3:05 PMcreateDefaultRelationshipTableFields() cares about table names, not so much model names or eloquent relationships. Does that make sense? If you need something super custom, you could inline the content of this helper function into your migration.kalle
03/15/2022, 5:25 PMphp
return app(TemplateRepository::class)->create(....)
Cant really use here afterSave to check model id
Resolvedpboivin
03/15/2022, 6:06 PMkalle
03/15/2022, 6:07 PMphp
public function create($fields)
{
return DB::transaction(function () use ($fields) {
$original_fields = $fields;
$fields = $this->prepareFieldsBeforeCreate($fields);
$object = $this->model->create(Arr::except($fields, $this->getReservedFields()));
$this->beforeSave($object, $original_fields);
$fields = $this->prepareFieldsBeforeSave($object, $fields);
$object->save();
$this->afterSave($object, $fields);
return $object;
}, 3);
}
It returns current instance of model which contains id of created record.pboivin
03/15/2022, 6:09 PMzynth
03/15/2022, 7:05 PMpboivin
03/15/2022, 7:06 PMzynth
03/15/2022, 7:07 PMhttp://homestead.test/homestead.test/img/f0e1cda9-6b15-455c-b3b8-ec0f9e39be71/mai-2022.png?fm=jpg&q=60&fit=max&dpr=1&h=256pboivin
03/15/2022, 7:08 PMAPP_URL=http://homestead.testzynth
03/15/2022, 7:08 PMpboivin
03/15/2022, 7:09 PMzynth
03/15/2022, 7:10 PMzynth
03/15/2022, 7:11 PMpboivin
03/15/2022, 7:11 PMzynth
03/15/2022, 7:13 PMpboivin
03/15/2022, 7:14 PMzynth
03/15/2022, 7:15 PMzynth
03/15/2022, 7:16 PMpboivin
03/15/2022, 7:19 PMzynth
03/15/2022, 7:20 PMtfilos
03/15/2022, 8:24 PMPHP message: PHP Fatal error: Uncaught Exception: Twill assets manifest is missing. Make sure you published/updated Twill assets using the "php artisan twill:update" command.. I tried installing node on the production server and running both twill:build and twill:update, getting the same thing. Definitely works locally. Last site I built with Twill, once it was deployed, I didn't encounter this.tfilos
03/15/2022, 8:25 PMlaravel-mix-merge-manifest but no love there, either.ifox
03/15/2022, 8:25 PMifox
03/15/2022, 8:26 PMpublic/assets/admin?tfilos
03/15/2022, 8:28 PMtfilos
03/15/2022, 8:28 PMpublic/assets/admin is there and is full of css, fonts, js, and the manifest file