I'm trying to follow the laracasts tutorial on laravel basics, but after you created composer and laravel without any problems, I canβt get the route file for working with the controller. I reinstalled laravel, copied it exactly, like laracasts has it, but still nothing, does anyone see something wrong with these two files?
routes.php files
<?php Route::get('/', ' Controller@index '); Route::get('contact', ' Controller@contact ');
controller.php file
<?php namespace App\Http\Controllers; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; abstract class Controller extends BaseController { use DispatchesJobs, ValidatesRequests; public function ___construct() { $this->middleware('guest'); } public function index() { return 'hello world!'; } public function contact() { return 'Contact me!'; } }
I have it hosted on localhost: 8888 using the phps server command if this is any help.
source share