Skip to main content
Tutorial Free

Laravel 11: New Artisan "make:interface" Command

March 15, 2024
1 min read

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:

app/Contracts/Lamboable.php:

<?php
 
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.

<?php
 
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

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Recent Courses on Laravel Daily

Next.js Basics for Laravel Developers

11 lessons
58 min

Laravel 13 Starter Kit Teams and Customizations

10 lessons
33 min

How to Structure Laravel 13 Projects

16 lessons
1 h 32 min read

No comments yet…