Ad

Understanding Routing In Laravel

- 1 answer

I started my project using Laravel, but I don't know how routing works.

Example code:

Route::get('/', function () {
    return view('welcome');
});

Where is the get static function? I searched in the Laravel /vendor directory but found nothing.

Ad

Answer

Actually, you are using Route Facade. Which facilitates to access object members in static environment. Facades uses __callStatic magic method of PHP.

Study the Facades here.

Ad
source: stackoverflow.com
Ad