Building Web Apps with Laravel Module 16
Product features: languages, search, admin and payments interview questions
Interview questions on “Product features: languages, search, admin and payments”: warm-ups, then what each harder question tests and how a good answer starts.
Warm-up questions
Short questions with short answers, each answered in full.
-
Fresher
When do you use a JSON translation file in Laravel, and when a PHP language file?
Answered in the lesson Localization: Hindi, English and Indian formats
-
Fresher to mid
Why does a new Filament panel work on your laptop but answer 403 in production?
-
Fresher to mid
Why is the page a payer returns to never proof of payment?
Answered in the lesson Payments, subscriptions and GST invoices
Questions with model answers
What each question tests, the first step of a good answer and the follow-ups to expect.
-
Mid to senior
Pathshala's Hindi pages show English sentences in some places and raw keys such as fees.overdue in others, and every release adds a few more. How do you find every missing Hindi line before a release, and how do you keep new ones from slipping in?
- What it tests
- Knowing how the translator falls back, turning missing lines into something a test can see, and choosing checks that run on every change instead of a one-off hunt.
- First step
- Write down the two ways a line goes missing: a key the Hindi files lack, so the fallback language shows, and a key no file has, so the key itself shows. Then decide which of the two a test can detect without opening every page.
- Follow-ups
-
- How do you make a missing key visible while tests run, without breaking production pages?
- How do you compare the Hindi files with the English ones?
- Who should write the missing lines, and how do you keep their wording consistent?
From the lesson Localization: Hindi, English and Indian formats
Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.Opening the model answers with your pass…
Model answers open with any MySmartCoPilot pass.
- Pro pass · 1 week₹79$2.99
- 30 days₹179$5.99
- 1 year₹1,699$45
One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.
Passes can’t be bought right now, so the model answers can’t be opened at the moment. If you have a pass, enter your licence key.
It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).
In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 4 minutes
-
Mid to staff
A queued job sends fee reminders to 500 guardians, about half of whom chose Hindi, and writes Hindi amounts in Devanagari digits. Some Hindi guardians get their reminder in English, and some English guardians get amounts in Devanagari digits. Explain what causes each fault, how you fix it, and how a test proves the fix.
- What it tests
- Seeing that a worker process keeps state between jobs, knowing which defaults the framework restores and which it does not, and writing a test that sends to two readers in a row.
- First step
- List every place the language of one reminder comes from: the app's locale, the default locale of Number, and anything the mail or notification class sets itself. Then ask which of these is put back after each reminder.
- Follow-ups
-
- How does a notification pick the guardian's language without the job setting it?
- Why does the amount's grouping leak from one guardian to the next?
- How would you write a test that catches the leak?
From the lesson Localization: Hindi, English and Indian formats
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 4 minutes
-
Mid to senior
Pathshala's StudentPolicy refuses to delete a student with unpaid fees, and the row's delete button is hidden for such students. Yet an admin deleted twelve students with dues from the Filament panel in one go. Explain how that happened, the fix, and the test that keeps it fixed.
- What it tests
- Knowing which policy method a bulk action asks, telling the bulk question from the record question, and turning an authorization rule into a test that fails on the weak version.
- First step
- List every way the panel can delete a student: the row action, the edit page and the bulk action. For each one, find which policy method it asks, and compare that with where the rule about dues lives.
- Follow-ups
-
- What does the fix cost when the policy needs a query for each student?
- How do you protect a custom bulk action, such as marking fees paid?
- Would moving the rule into deleteAny() work?
From the lesson Admin panels with Filament
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
-
Senior to staff
Pathshala's panel uses Filament tenancy for its centres, and every test of the students table passes. Still, the Andheri dashboard shows Thane's overdue count, and Thane's guardians received Andheri's fee reminders. Find the likely causes and fix them so that they stay fixed.
- What it tests
- Knowing exactly what the tenant scope covers, finding the queries and jobs outside it, and designing tests that compare the numbers inside and outside the scope.
- First step
- Write down every place that reads students without going through the resource's list page: widgets, reports, queued jobs, exports and caches. For each one, ask whether a tenant is set when it runs and whether its query goes through the Student model.
- Follow-ups
-
- Why did the table tests not catch this?
- How do you make a queued job safe?
- What would you do about caches?
From the lesson Admin panels with Filament
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
-
Mid to senior
A startup's lead asks you to choose how to build its back office: Filament, Laravel Nova, or admin pages of its own on a Laravel starter kit. The office needs about thirty screens within a quarter, and the team of four knows Livewire. Make the choice and defend it, including what it costs over the next two years.
- What it tests
- Weighing generated screens against control, licences and upgrade effort, and turning a preference into a decision with criteria a team can revisit.
- First step
- Write down the criteria before the options: how many screens, how soon, who maintains them, how closely they must match the product, and what each choice brings with it in licences and major upgrades.
- Follow-ups
-
- What would make you choose pages of your own instead?
- How do you contain the upgrade risk of a third-party panel?
- What must not be generated, whatever you choose?
From the lesson Admin panels with Filament
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
-
Mid to senior
Pathshala's ledger holds twice the fee for one payment of a term fee: the gateway sent two capture events for it, two queue workers handled them at the same moment, and both were applied. Explain how both workers got through, the fix, and the tests that keep it fixed.
- What it tests
- Knowing how two workers holding the same row race, letting the database decide what PHP cannot, and reproducing a race in a test without threads or timing.
- First step
- Write down, step by step, what each worker read and when it wrote, for two events that arrive together. Then mark which of those steps the database checks and which only PHP checks.
- Follow-ups
-
- Why does storing each event id once not prevent this?
- What should the webhook answer for the second capture?
- How do you test it on SQLite?
From the lesson Payments, subscriptions and GST invoices
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
-
Mid to senior
Pathshala's monthly plan renews through gateway events. Some customers got two months for one payment, and one lost access the day after paying. Find the likely causes in the renewal code and design handling that stays right when events repeat or arrive out of order.
- What it tests
- Recognising that webhook events can repeat and arrive late, storing what an event says instead of applying a change, and deciding what access means after a failed charge.
- First step
- List the events the gateway may send for one period and what the code does with each. Then deliver each one twice, and in a different order, on paper, and follow where the stored end of the period goes.
- Follow-ups
-
- How long should a failed renewal keep access, and who decides?
- What does Cashier do with a past-due Stripe subscription?
- How do you test the end of the grace period?
From the lesson Payments, subscriptions and GST invoices
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
-
Senior to staff
An auditor finds, in one financial year of Pathshala's GST invoices, two invoices with the same number, a gap of four numbers, and invoices issued just after midnight at the start of the year that carry the old year's series. Find the causes and design numbering that has none of these problems.
- What it tests
- Finding every way an invoice number can repeat, go missing or land in the wrong year, and closing each with a guard that a test can prove.
- First step
- Treat the three symptoms as three separate bugs: the duplicate, the gap and the wrong year. For each, write down what the code read, what it wrote, when, inside which transaction, and by which clock.
- Follow-ups
-
- Why not number invoices with a database sequence or the auto-increment id?
- How do you test the year end without waiting for March?
- Where does sending the invoice by e-mail belong?
From the lesson Payments, subscriptions and GST invoices
Model answer, Pro.In the answer:
- Model answer
- Follow-up answers
- Common mistakes
- Rubric
- Variants
- about 3 minutes
All Building Web Apps with Laravel interview questions · The Building Web Apps with Laravel track