DEV Community


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

abdullahalnoor profile image Md Abdullah al noor ・1 min read

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…

Discussion (0)

Editor guide