How to Import Multiple Classes from a Single Namespace in Laravel
In this lesson, we will see how to import multiple classes from a single namespace in Laravel by adding only one single line of code.
Use multiple models by adding only one single line of code
To do that see the example below:
//old way of importing modelsuse App\Models\Category;use App\Models\Post;use App\Models\Subcategory;
//new way of importing modelsuse App\Models\{Category,Post,Subcategory};