Steam Wash — Laravel

Build Mas Rudi's bike wash app in Laravel: Blade, the container, events, queues, policies, tests. 16 levels, right in the browser.

What the levels ask

  1. Steam Sinar has a TV on the wall showing the bike queue from Mr. Rudi's Laravel app. This morning Bagas changed his account name to <h1>BAGAS JUARA 1</h1>. Pick how papan.blade.php prints the customer's name, so the TV writes each person's name exactly as they typed it, with nothing turning into HTML.
  2. At six in the morning there are no bikes yet, and a black TV makes people think the app is dead. Mr. Rudi wants the board to write Belum ada antrean. Silakan masuk! (no queue yet, come on in) when it is empty, and to number the queue from 1 once bikes arrive. Pick the loop's opening, its number, and its closing.
  3. Mr. Rudi moved each queue row into an <x-kartu-motor> component: the plate is sent as a prop, the owner's name through the slot. The page uses the layouts.tv layout. Pick the page section to fill and how to send the plate, so the TV shows three cards, each with its own bike's plate.
  4. Now the Selesai (Done) button on the till laptop sends a WhatsApp to the bike's owner. CucianController asks for PengirimWa through its constructor, and PengirimWa is an interface. Pick what is bound in AppServiceProvider, so the phones of Mr. Tono and Mrs. Sari really ring.
  5. The motorbike taxi base sends five bikes at once. Steam Sinar has only three steam bays, and BilikSteam hands out bay numbers during one request; the fourth and fifth bikes must wait. BilikSteam needs a number, $kapasitas. Pick how to give it that capacity and how the container shares BilikSteam.
  6. When a bike is washed, CucianController sends the MotorSelesai event. Three listeners respond: CatatPendapatan, BeriCap (a stamp on the member card; five stamps mean a free wash) and KirimWaSiap. Mr. Tono already has four stamps. Arrange the order they are registered in, so Mr. Tono's WhatsApp tells him about his fifth stamp.
  7. Mr. Rudi adds CekLunas at the front and BebaskanBilik at the back. Bagas has not paid: his bike must stay in its bay, with no income, stamp or WhatsApp. Grandma Marni has paid but has no phone: her bay must be free again. Pick what CekLunas does for an unpaid bike, and how KirimWaSiap sends its message.
  8. The WhatsApp provider is slow, about three seconds a message, and this afternoon three bikes are finished one after another. Mr. Rudi wants the till page to come back at once, with the messages sent in the background by php artisan queue:work. Pick how KirimWaSiap is declared and the queue connection in .env, so no WhatsApp is sent while the till waits, and all of them arrive afterwards.
  9. Receipts are now sent by the KirimStruk job. At 14.00 the WhatsApp provider goes down for 20 seconds, just as three bikes are finished. Ms. Wulan's number is also refused by the provider because it is not registered. The receipts for the neighbourhood head and Mrs. Sari must still arrive, and Ms. Wulan's failed receipt must be marked so Mr. Rudi prints it. Pick the number of tries, the wait between them, and what happens when the job gives up.
  10. After sending a receipt, KirimStruk also writes a row to Mr. Rudi's daily recap. This afternoon the recap failed once for Mr. Tono's bike, and the WhatsApp provider failed once for Mrs. Sari. The job is tried up to three times. Pick how the receipt is sent, so each person gets exactly one receipt even when the job is retried.
  11. The till laptop lags, and Mr. Rudi taps Selesai (Done) twice for Mr. Tono's bike. Afterwards Ms. Wulan picks up two bikes at once: the post office bike and her own. Pick how KirimStruk is declared and its unique key, so Mr. Tono gets one receipt and Ms. Wulan two, one per bike.
  12. People can now book a wash time and cancel it from their phones. CucianPolicy::batal allows only the booking's owner. Bagas opens Mr. Tono's booking, then sends a cancel request straight from his phone without pressing any button. Pick how the controller guards cancelling and how the page shows the button.

And more, 16 levels in all.