-
-
Save uno-de-piera/5975d9b743a74327676bd44448f272d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
class HomeController extends Controller | |
{ | |
public function __invoke() { //definimos el método mágico __invoke de PHP | |
return 'home controller __invoke'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Route; | |
Route::get('home', 'HomeController'); //llamada sin método, directamente al controlador |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment