File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ class Categoria extends Model
3838
3939 protected static $ parent_identifier = 'parent ' ;
4040
41- public static function build ($ colore = null )
41+ public static function build ($ colore = null , $ nome = null )
4242 {
4343 $ model = new static ();
44+ $ model ->name = $ nome ;
4445 $ model ->colore = $ colore ;
4546 $ model ->save ();
4647
Original file line number Diff line number Diff line change 113113 $ link = Modules::link ('Categorie ' , $ categoria_new ->id , $ categoria_new ->getTranslation ('title ' ));
114114 flash ()->error ($ message .': ' .$ link );
115115 } else {
116- $ categoria = Categoria::build ($ colore );
116+ $ categoria = Categoria::build ($ colore, $ nome );
117117 $ id_record = $ dbo ->lastInsertedID ();
118118 $ categoria ->parent = $ id_original ;
119119 $ categoria ->is_articolo = $ is_articolo ;
You can’t perform that action at this time.
0 commit comments