This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="{{App::getLocale()}}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>{block name=title}default{/block}</title> | |
{{HTML::style("/packages/bootstrap/css/bootstrap.min.css")}} | |
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> | |
<!--[if lt IE 9]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{extends file='layouts/default.tpl'} | |
{block name=title}sample{/block} | |
{block name=contents} | |
<h1 class="form-signin-heading">register</h1> | |
{{Form::open(['action' => 'RegisterController@confirm', "class" => "form-signin"])}} | |
{{Form::text('email', null, ["class" => "form-control", "placeholder"=>"email", "autofocus" => true])}} | |
{{Form::password('password', ["class" => "form-control", "placeholder"=>"password"])}} | |
{{Form::close()}} | |
{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controllers; | |
class HomeController extends BaseController | |
{ | |
public function showWelcome() | |
{ | |
\View::registerFilter('post', [$this, 'add_header_comment']); | |
// または |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class ApplicationServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\Route::group(['namespace' => 'App\Controllers'], function () { | |
\Route::get('/{name?}', ['uses' => 'HomeController@showWelcome', 'as' => 'welcome']); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace App\Controllers; | |
class HomeController extends BaseController | |
{ | |
/** | |
* @param null $name | |
* @return $this | |
*/ | |
public function showWelcome($name = null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{$name}} |