MwSpaceLLC

MwSpaceLLC

CTO/CEO at MwSpace LLC

Member Since 1 Year Ago

Perugia

Experience Points
1,090
Total
Experience

3,910 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,090 XP
Oct
02
4 months ago
Activity icon

Started a new Conversation PHPOffice/PHPWord - Load DocX List (explode Language)

hi there!

today i want to ask if u know how i can load this example file in object and explode from language:

DocX file are on for product's folder (the product folder are more then 40/50) :

SERBATOI COIBENTATI

  • Serbatoio refrigerato realizzato in acciaio inox.
  • Per lo stoccaggio dei seguenti prodotti: miele, birra, vino, succhi di frutta e salse.
  • Capacità serbatoio: da 1.000 a 30.000 lt.
  • 4 piedi inox con piastra.
  • Sfiato di sicurezza con retina antinsetti.
  • Passo duomo frontale.
  • Portella con preleva campioni.
  • Pozzetto per sonda temperatura.
  • Pala agitatrice interna, mossa da motoriduttore a vite con motore ventilato.
  • Sfera di lavaggio.
  • Pannello elettrico a bordo macchina con pulsante marcia-arresto agitatore.

INSULATED TANKS

  • Refrigerated milk storage tank made of stainless steel.
  • For the storage of the following products: honey, beer, wine, fruit juices and sauces.
  • Tank capacity: from 1.000 to 30.000 lt.
  • 4 stainless steel feet with plate.
  • Safety vent with insect proof screen.
  • Frontal manhole.
  • Door with sample collection.
  • Well for temperature probe.
  • Internal agitator blade, driven by a screw geared motor with ventilated motor.
  • Washing diffuser.
  • Electrical panel on board the machine with start/stop button.

CUVES ISOLÉES

  • Réservoir de stockage de lait réfrigéré en acier inoxydable.
  • Pour le stockage des produits suivants : miel, bière, vin, jus de fruits et sauces.
  • Capacité du réservoir: de 1.000 à 30.000 lt.
  • 4 pieds en acier inoxydable avec plaque.
  • Ventilateur de sécurité avec moustiquaire.
  • Trou dhomme frontal.
  • Porte avec prélèvement d'échantillons.
  • Puits pour sonde de température.
  • Lame interne de l'agitateur, entraînée par un motoréducteur à vis avec moteur ventilé.
  • Diffuseur de lavage.
  • Tableau électrique à bord de la machine avec touche marche/arrêt.

ИЗОЛИРОВАННЫЕ РЕЗЕРВУАРЫ

  • Изолированный резервуар из нержавеющей стали AISI 304 для хранения молока.
  • Для хранения таких продуктов как: мед, пиво, вино, соки и соусы.
  • Резервуар танк объемом: от 1.000 л до 30.000 л.
  • 4 ножки из нержавеющей стали с пластиной.
  • Вентиляционное отверстие с защитной сеткой от насекомых.
  • Фронтальный люк.
  • Дверца для забора образцов.
  • Отделение для зонда температуры.
  • Внутренняя мешалка, приводимая в движение винтовым мотор-редуктором, оснащенным мотором с вентиляцией.
  • Диффузор для мойки.
  • Электрощит с кнопками запуска-остановки.

i've thinked that my script load all file in folder and if file is docx, load it with phpword.

then i mast explode for BOLD line language.

ok, all work. but where is the problem ?

some page not load all text in docX file. (the file is same)

If u know why. i will be Happy

private function explodeFromBoldDocx($cat){}

´´´

    $doc = new \stdClass();
    $doc->it = new \stdClass();
    $doc->it->content = array();

    $doc->en = new \stdClass();
    $doc->en->content = array();

    $doc->fr = new \stdClass();
    $doc->fr->content = array();

    $doc->ru = new \stdClass();
    $doc->ru->content = array();

    foreach (Storage::disk('cat')->files("$cat") as $key => $documents) {

        $pbpath = public_path(".cat/$documents");

        if (preg_match('/\.(docx?|DOCX?)(?:[\?\#].*)?$/', $pbpath)) {

            $phpWord = IOFactory::load($pbpath);

            /**
             * @set title index
             * +"it": {#332 ▼
             * +"title": ""
             */
            $loopTitleBold = 0;
            foreach ($phpWord->getSection(0)->getElements() as $element) {

                if ($element instanceof \PhpOffice\PhpWord\Element\TextRun) {

                    if ($element->getElement(0)->getFontStyle()->isBold()) {

                        switch ($loopTitleBold):
                            case 0:
                                $doc->it->title = $element->getElement(0)->getText();
                                break;

                            case 1:
                                $doc->en->title = $element->getElement(0)->getText();
                                break;

                            case 2:
                                $doc->fr->title = $element->getElement(0)->getText();
                                break;

                            case 3:
                                $doc->ru->title = $element->getElement(0)->getText();
                                break;
                        endswitch;

                        $loopTitleBold++;
                    }
                }
            }

            /**
             * @set title index
             * +"title": ""
             */
            $loopContentBold = 0;
            $loopIndexBold = app()->getLocale();
            foreach ($phpWord->getSection(0)->getElements() as $element) {

                /**
                 * @set index popolation
                 * +"?": {#332 ▼
                 */
                if ($element instanceof \PhpOffice\PhpWord\Element\TextRun) {
                    if ($element->getElement(0)->getFontStyle()->isBold()) {
                        switch ($loopContentBold):
                            case 0:
                                $loopIndexBold = 'it';
                                break;
                            case 1:
                                $loopIndexBold = 'en';
                                break;
                            case 2:
                                $loopIndexBold = 'fr';
                                break;
                            case 3:
                                $loopIndexBold = 'ru';
                                break;
                        endswitch;
                        $loopContentBold++;
                    }
                }

                if ($element instanceof \PhpOffice\PhpWord\Element\ListItemRun) {
                    $doc->$loopIndexBold->content[] = $element->getElement(0)->getText();
                }
            }
        }
    }

    $locale = app()->getLocale();

    return $doc->$locale;

´´´

Sep
16
5 months ago
Activity icon

Replied to LatestActivity Conditional

This is the result of 2 users:

"lastReply => {"id":1,"user_id":1,"department_id":1,"subject":"Video MONITOR luciani SETTEMBRE","status":1,"created_at":"2019-09-15 13:46:27","updated_at":"2019-09-15 13:46:27"} | authID => 2 "

"lastReply => {"id":1,"user_id":1,"department_id":1,"subject":"Video MONITOR luciani SETTEMBRE","status":1,"created_at":"2019-09-15 13:46:27","updated_at":"2019-09-15 13:46:27"} | authID => 1 "

Activity icon

Replied to LatestActivity Conditional

Hi, tnks for the reply, but the script not work with this code. i have changed it for correct work:

Tickets::whereHas('lastReply', function ($query) { $query->where('user_id', '!=', auth()->id()); })->get();

Sep
15
5 months ago
Activity icon

Started a new Conversation LatestActivity Conditional

Hi, i want to retrive last tickets user reply conditional.

example;

        $emptyTickets = Tickets::where('status', 1)
            ->whereDoesntHave('replies')->get();

        $unreplyTickets = Tickets::with('latestActivity')
            ->whereHas('replies', function ($q) {
                $q->where('user_id', '!=', Auth::id());
            })->get();

// $tickets = $unreplyTickets->merge($emptyTickets); $tickets = $unreplyTickets;

The condition that i want must return ticket only if last reply in relation is not equal at the user.

with this method i wnat to see to user only ticket that not have Auth::id() reply.

Please, if u know result , u can help =) (now not work)