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)