Jess McKenzie Jess McKenzie - 4 months ago 16
PHP Question

Sub Domain Route Not Working

In my

I have the following route set up. What I was wanting to know is there something specific that I need to follow to get a sub domain of a sub domain to work?

The domain I am using is blah.blah.domain.tld


Route::group(['domain' => '{blah}.blah.domain.tld'], function (){

Route::get('', 'DealsFrontEnd@index' );




namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class DealsFrontEnd extends Controller
public function index()
return view('');


Too long for a comment: Try using a closure for debugging:

Route::group(['domain' => '{blah}.blah.domain.tld'], function (){

    Route::get('', function() {
        echo "Hello World";


Make sure you have debug enabled to make use of Laravel's error handling/reporting.

As I said in the comments, you shouldn't wrap the subdomain in brackets unless you want it to be dynamic.

{blah}.blah means it will capture anything.blah and the route variable $blah will be equal to anything.