Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nanuqcz's avatar

Fast prototyping (with as little writing as possible) tips?

Hello,

I'm new to Laravel. My goal is to create web app prototype as fast as possible. With as little writing neeeded as possible.

To reduce writing redundance, I'm thinking of this for example:

  1. Generate DB migrations from model classes. The idea is: Why do I have to write my data struture twice? Once in model class, then in DB migration script again? I've found this tool on GitHub: kitloong/laravel-migrations-generator . Do you guys use it often, is it reliable? Or is there a better solution?

  2. Universal route. The idea is: Why should I write the same controller and action names three times? In 90 % of cases we have things like UserController::edit() which translates into /user/edit route which translates into user/edit.blade.php. Don't you see the unnecesary redundance? I'm thinking of some universal route like this:

Route::get('/{controller}/{action?}/{id?}', function ($controller, $action = 'index', $id = NULL) {
    return view("$controller/$action", ['id' => $id]);
});

...which should cover 90 % of all common needs.

Do you have any tips how to prototype faster and with less spent energy like these?

Thank you.

0 likes
1 reply

Please or to participate in this conversation.