dimanche 27 décembre 2020

why laraval routing return the object instead of echoing it or printing it directlly?

in laravel routing we can pass a closure and it returns the result. so my question is why it cannot echo or print the result than returning it?. is it the closurity property of php or laraveles routing rule.

Route::get('/',function(){
    return 'hello world';
 });


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire