app/CentralItems.php
/*
     * Create item field when create a kit type
     */
Create item field when create a kit type
Create item field when create a kit type
public static function createNewItemPosition($type_id, $central_id){
        try{
            $itemType = ItemType::find($type_id);
            $centralItems = new CentralItems();
            $centralItems->central_id = $central_id;
            $centralItems->item_slug = $itemType->type_slug;
            $centralItems->item_name = $itemType->type_name;
            $centralItems->items = 1;
            return true;
        }catch (Exception $e){
            return false;
        }
    }
public static function createNewItemPosition ( $ type_id , $ central_id ) { try { $ itemType = ItemType :: find ( $ type_id ) ; $ centralItems = new CentralItems ( ) ; $ centralItems -> central_id = $ central_id ; $ centralItems -> item_slug = $ itemType -> type_slug ; $ centralItems -> item_name = $ itemType -> type_name ; $ centralItems -> items = 1 ; return true ; } catch ( Exception $ e ) { return false ; } }
Create item field when create a kit type
Create item field when create a kit type