phpenv はユーザ・ディレクトリごとに使用するPHPを選択することができます。 また、簡単に使用するPHPのバージョンを変更することができます。
各環境ごとにPHPをビルドしたものを適用するため、 phpenvを利用するにはPHPをビルドできるようにする必要があります。
<?php | |
use App\Notifications\WonderSlack; | |
use App\Notifications\DmCreated; | |
(new WonderSlack())->notify(new DmCreated('DMデータが作成されました。')); |
<?php | |
namespace App\Notifications; | |
use Illuminate\Notifications\Notifiable; | |
class WonderSlack | |
{ | |
use Notifiable; |
<?php | |
namespace App\Notifications; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Notifications\Notification; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Notifications\Messages\SlackMessage; | |
use App\Notifications\WonderSlack; |
<?php | |
namespace App\Notifications; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Notifications\Notification; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Notifications\Messages\MailMessage; | |
class DmCreated extends Notification |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>API test</title> | |
</head> | |
<body> | |
<div id="contents"> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> |
<?php | |
$targets = [ | |
"Hoge", | |
"Fuga", | |
]; | |
foreach ($targets as $target) { | |
$contents = <<<TEMPLATE | |
<?php |
$ composer require friendsofsymfony/user-bundle |
<?php | |
/** | |
$targets に記載されたメソッド名よりsetter/getterを生成します | |
*/ | |
$targets = [ | |
"FooName", | |
"BarName" | |
]; |
{ | |
"name": "buildHTML", | |
"version": "0.0.0", | |
"description": "Build for my software HTML", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "BSD", |