DEV Community

Md Abdullah al noor
Md Abdullah al noor

Posted on

how does keyword 'use ' works in php (laravel)

I don't understand how does use keyword works in laravel framework

I create a controller PostsManagerController.php

this controller has a namespace App\Http\Controllers;

until here everything is fine the problem is in routes/web.php

i find this two lines

use App\Http\Controllers\PostsManagerController
use Illuminate\Support\Facades\Route;

my question is how routes/web.php know the PostsManagerController class…

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more