Laravel 11: New Artisan "make:interface" Command

Laravel 11 introduced new Artisan commands. Let's look at the make:interface command in this post.

As with every Artisan command, you can pass the file name to create or leave empty, and Laravel will ask.

make interface command

Here is how the generated interface looks like:


namespace App\Contracts;
interface Lamboable

As with every generated file, the interface also has stubs so that you can modify them to your needs. After publishing the subs, you can find stubs/interface.stub.

namespace {{ namespace }};
interface {{ class }}

The make:interface Artisan command has additional options, which you can check by adding the --help option.

make interface command help

No comments or questions yet...

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 59 courses (1056 lessons, total 44 h 09 min)
  • 78 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials