Permalink
Browse files

remove env helper for config helper in code to avoid error when env k…

…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 fee92d7d1d9b47ef0cab4159e23464d1e4db17a8
@@ -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',
@@ -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',
@@ -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)),
],
];
@@ -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'));
}
}
@@ -21,6 +21,8 @@
*/
'name' => 'l5essential',
'description' => 'Laravel 5 입문 및 실전 강좌',
'app_domain' => env('APP_DOMAIN', 'myproject.dev'),
'api_domain' => env('API_DOMAIN', 'api.myproject.dev'),
/*
|--------------------------------------------------------------------------
@@ -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-->
@@ -1,7 +1,9 @@
# 라라벨 5 입문 및 실전 강좌
# 라라벨 (Laravel) 5 입문 및 실전 강좌
[![Build Status](https://travis-ci.org/appkr/l5essential.svg)](https://travis-ci.org/appkr/l5essential)
라라벨은 PHP 언어로 개발된 풀스택 웹 어플리케이션 프레임웍이다.
## 라이브 데모 사이트
아래 주소를 방문하면 이 강좌에서 개발한 최종 결과물을 볼 수 있다.
@@ -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') }})" />
@@ -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');
}
/**
@@ -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');
}
/**

0 comments on commit fee92d7

Please sign in to comment.