このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 麻雀ルール [チップ・焼鳥について]
- 71 vsftpd [Difference Between PASV Mode and ACTIVE Mode]
- 2024.07.02 Windowsライセンス有効期限 [ライセンスの有効期限を確認方法]
最近の更新
ウェブ職人のためのPHPフレームワーク
http://laravel.jp/
composerはこちら
$ composer global require "laravel/installer=~1.4"
Pathを通しておく
$ echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bash_profile
/var/www/vhost/hogehoge.comにインストールするとする。
# cd /var/www/vhost/hogehoge.com # laravel new
$ php artisan --version Laravel Framework 5.7.21
/var/www/vhost/hogehoge.comにlaravel newしたとする
<VirtualHost *:80> ServerName hogehoge.com DocumentRoot /var/www/vhost/hogehoge.com/public ・ ・
php artisan serve --host 0.0.0.0
routes/web.phpに下記行追加
routes/web.php
Route::get('hello', 'HelloController@index');
$ php artisan make:controller HelloController
app/Http/Controllers/HelloController.php
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class HelloController extends Controller { public function index() { return view('hello'); } }
resources/views/hello.blade.php
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Hello World</title>
</head>
<body>
Hello World
</body>
</html>
$ laravel new In NewCommand.php line 42: The Zip PHP extension is not installed. Please install it and try again. new [--dev] [--5.2] [--] [<name>]
対応
# yum install php-pecl-zip
Script "post-install-cmd" is not defined in this package
対応
$ composer global require "laravel/installer=~1.4"