DEV Community

Raju
Raju

Posted on

Learning Laravel 12 by Building a Medium Clone

Image description

Sharing my journey with Artisan, Tinker, Blade, Flowbite, and Vite

Over the past few weeks, I’ve been diving
into Laravel 12 as part of my journey to become a better full-stack developer. Instead of following tutorials step-by-step, I wanted to build something real — a Meidum Clone to put my learning into practice.

In this post, I’ll share how I've used Artisan, Tinker, and tools like Blade, Flowbite, Tailwind CSS, and Vite to build this project and grow as a developer.

🛠 Why Laravel 12?

I chose Laravel 12 for this project because of its powerful ecosystem, simplicity, and flexibility. Laravel offers a range of tools out of the box that make web development faster and more efficient. I’m particularly enjoying the developer experience with tools like Artisan and Tinker, which have become essential parts of my workflow.

⚡ Laravel Artisan — A Developer’s Best Friend

Artisan is Laravel’s command-line interface, and it’s one of the features that has significantly improved my development speed. Whether I’m creating models, migrations, controllers, or performing database operations, Artisan makes everything feel seamless.

For example, creating a model, migration, and controller for my project is as simple as:

php artisan make:model Article -mcr
Enter fullscreen mode Exit fullscreen mode

This command automatically generates:

  • A model for interacting with the database
  • A migration for setting up the database structure
  • A controller to handle the business logic

Another useful command that speeds up my workflow is:

php artisan migrate
Enter fullscreen mode Exit fullscreen mode

This quickly runs database migrations and updates my SQLite database. Simple, yet so powerful!

💬 Laravel Tinker — Play with Code

Tinker is another great tool in the Laravel ecosystem. It’s essentially a REPL (Read-Eval-Print Loop) for Laravel, allowing me to interact with the application directly from the terminal.

I use Tinker to test queries and data operations, without needing to go through the entire process of creating views or controllers. For example, to add a new article:

php artisan tinker
Enter fullscreen mode Exit fullscreen mode

And then inside Tinker, I can run:

Article::create([
  'title' => 'My first article',
  'content' => 'Learning Laravel is fun!',
  'user_id' => 1
]);
Enter fullscreen mode Exit fullscreen mode

Tinker allows me to quickly verify that my database operations are correct without needing to set up the full frontend.

🎯 Learning and Building Along the Way

As I continue to work on this Medium clone, I'm focusing on building and learning at the same time. Laravel's tools, like Artisan and Tinker, have been integral in this process. They not only improve my productivity but also help me better understand how Laravel works under the hood.

By building a real project, I get to apply my learning in a meaningful way, which is much more effective than just following tutorials. I’m learning how to:

  • Work with Blade templating
  • Build beautiful, responsive UIs with Flowbite and Tailwind CSS
  • Manage assets efficiently with Vite
  • Leverage Laravel’s powerful features like Artisan and Tinker to streamline development

🔗 Connect and Share

If you’re also learning Laravel or building a full-stack app, feel free to reach out or share your progress. I’m always open to connecting with others and sharing what I’m learning. You can follow along with my journey as I continue to build and improve this project.

Thanks for reading, and happy coding!

Top comments (0)