Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created Jan 31, 2019
Embed
What would you like to do?
<?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';
}
}
<?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