Skip to content

Commit

Permalink
remove env helper for config helper in code to avoid error when env k…
Browse files Browse the repository at this point in the history
…ey is not defined. readme touched

for SEO. rebase and squash unnecessary commit logs
  • Loading branch information
appkr committed Jan 22, 2016
1 parent e2cd32b commit fee92d7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/Http/routes.php
@@ -1,6 +1,6 @@
<?php

Route::group(['domain' => env('API_DOMAIN'), 'as' => 'api.', 'namespace' => 'Api', 'middleware' => 'cors'], function() {
Route::group(['domain' => config('project.api_domain'), 'as' => 'api.', 'namespace' => 'Api', 'middleware' => 'cors'], function() {
/* Landing page */
Route::get('/', [
'as' => 'index',
Expand Down Expand Up @@ -64,7 +64,7 @@
});
});

Route::group(['domain' => env('APP_DOMAIN')], function() {
Route::group(['domain' => config('project.app_domain')], function() {
/* Landing page */
Route::get('/', [
'as' => 'index',
Expand Down
2 changes: 1 addition & 1 deletion app/Transformers/AttachmentTransformer.php
Expand Up @@ -22,7 +22,7 @@ public function transform(Attachment $attachment)
'created' => $attachment->created_at->toIso8601String(),
'link' => [
'rel' => 'self',
'href' => url(sprintf('http://%s:8000/attachments/%s', env('APP_DOMAIN'), $attachment->name)),
'href' => url(sprintf('http://%s:8000/attachments/%s', config('project.app_domain'), $attachment->name)),
],
];

Expand Down
2 changes: 1 addition & 1 deletion app/helpers.php
Expand Up @@ -150,7 +150,7 @@ function current_url()
*/
function is_api_request()
{
return starts_with(request()->getHttpHost(), env('API_DOMAIN'));
return starts_with(request()->getHttpHost(), config('project.api_domain'));
}
}

Expand Down
2 changes: 2 additions & 0 deletions config/project.php
Expand Up @@ -21,6 +21,8 @@
*/
'name' => 'l5essential',
'description' => 'Laravel 5 입문 및 실전 강좌',
'app_domain' => env('APP_DOMAIN', 'myproject.dev'),
'api_domain' => env('API_DOMAIN', 'api.myproject.dev'),

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions lessons/33-social-login.md
Expand Up @@ -170,8 +170,8 @@ class AuthController extends Controller
---

- [목록으로 돌아가기](../readme.md)
- [32강 - 사용자 로그인](docs/32-login.md)
- [34강 - 사용자 역할](docs/34-role.md)
- [32강 - 사용자 로그인](32-login.md)
- [34강 - 사용자 역할](34-role.md)
<!--@end-->


Expand Down
4 changes: 3 additions & 1 deletion readme.md
@@ -1,7 +1,9 @@
# 라라벨 5 입문 및 실전 강좌
# 라라벨 (Laravel) 5 입문 및 실전 강좌

[![Build Status](https://travis-ci.org/appkr/l5essential.svg)](https://travis-ci.org/appkr/l5essential)

라라벨은 PHP 언어로 개발된 풀스택 웹 어플리케이션 프레임웍이다.

## 라이브 데모 사이트

아래 주소를 방문하면 이 강좌에서 개발한 최종 결과물을 볼 수 있다.
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/master.blade.php
Expand Up @@ -11,7 +11,7 @@
<meta name="google-site-verification" content="{{ config('project.seo.google_site_key') }}" />
<meta name="naver-site-verification" content="{{ config('project.seo.naver_site_key') }}"/>
<meta property="og:site_name" content="{{ config('project.description') }}" />
<meta property="og:image" content="//{{ env('APP_DOMAIN') }}/images/logo_laravel.png" />
<meta property="og:image" content="//{{ config('project.app_domain') }}/images/logo_laravel.png" />
<meta property="og:type" content="Website" />
<meta property="article:author" content="{{ config('project.contacts.author.name') }} ({{ config('project.contacts.author.email') }})" />

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Http/Controllers/Api/ApiTest.php
Expand Up @@ -50,7 +50,7 @@ class ApiTest extends \TestCase
public function setUp()
{
parent::setUp();
$this->baseUrl = sprintf('http://' . env('API_DOMAIN'));
$this->baseUrl = 'http://' . config('project.api_domain');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Http/Controllers/AuthTest.php
Expand Up @@ -45,7 +45,7 @@ class AuthTest extends \TestCase
public function setUp()
{
parent::setUp();
$this->baseUrl = sprintf('http://' . env('APP_DOMAIN'));
$this->baseUrl = 'http://' . config('project.app_domain');
}

/**
Expand Down

0 comments on commit fee92d7

Please sign in to comment.