Complete the code to declare a sub-namespace inside the main namespace.
<?php namespace App\\[1]; class User {}
The sub-namespace Models is declared inside the main namespace App.
Complete the code to use a class from a sub-namespace with the correct fully qualified name.
<?php
use App\\[1]\\User;
$user = new User();
The class User is inside the sub-namespace Models, so we use App\Models\User.
Fix the error in the namespace declaration by completing the sub-namespace correctly.
<?php namespace App\\[1]\\Services; class Payment {}
The sub-namespace Billing is the correct part of the namespace for the Payment service.
Fill both blanks to create a nested sub-namespace and declare a class inside it.
<?php namespace App\\[1]\\[2]; class Logger {}
The class Logger is declared inside the nested sub-namespace App\Utils\Helpers.
Fill all three blanks to import a class from a nested sub-namespace and create its instance.
<?php use App\\[1]\\[2]\\[3]; $logger = new Logger();
The class Logger is imported from the nested sub-namespace App\Utils\Helpers\Logger and instantiated.