Skip to content

Commit 16dfcbe

Browse files
committed
Updated code to match tutorial changes/feedback.
1 parent e392fa7 commit 16dfcbe

File tree

12 files changed

+30
-44
lines changed

12 files changed

+30
-44
lines changed

app/config/admin/view.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
"paths" => [app_path() . "/views/admin"]
5+
];

app/config/en/view.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/config/nl/view.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/config/www/view.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
"paths" => [app_path() . "/views/www"]
5+
];

app/controllers/IndexController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ class IndexController
55
{
66
public function indexAction($sub)
77
{
8-
App::setLocale($sub);
8+
App::setLocale("en");
9+
10+
if (Input::get("lang") === "nl")
11+
{
12+
App::setLocale("nl");
13+
}
914

1015
return View::make("index/index", [
1116
"post" => Post::first()

app/routes.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
}
3232

3333
Route::group([
34-
"domain" => "dev.en.tutorial-laravel-4-multisites"
34+
"domain" => "dev.www.tutorial-laravel-4-multisites"
3535
], function()
3636
{
37-
Route::any("/cheese", function()
37+
Route::any("/about", function()
3838
{
39-
return "You are not welcome here!";
39+
return "This is the client-facing website.";
4040
});
4141
});
4242

4343
Route::group([
44-
"domain" => "dev.nl.tutorial-laravel-4-multisites"
44+
"domain" => "dev.admin.tutorial-laravel-4-multisites"
4545
], function()
4646
{
47-
Route::any("/cheese", function()
47+
Route::any("/about", function()
4848
{
49-
return "You are welcome here!";
49+
return "This is the admin site.";
5050
});
5151
});
5252

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@extends("layout")
2+
@section("content")
3+
Please log in to use the admin.
4+
@stop

app/views/nl/layout.blade.php renamed to app/views/admin/layout.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!doctype html>
2-
<html lang="nl">
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>Laravel 4 Multisites</title>
5+
<title>Laravel 4 Multisites - Admin</title>
66
</head>
77
<body>
88
@yield("content")

app/views/nl/index/index.blade.php

Lines changed: 0 additions & 23 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)