Skip to content

Instantly share code, notes, and snippets.

View pinekta's full-sized avatar
🏠
Working from home

Keita Matsubara pinekta

🏠
Working from home
View GitHub Profile
<?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
@pinekta
pinekta / apitest.html
Created February 21, 2017 14:22
for api test
<!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
@pinekta
pinekta / file0.txt
Created April 28, 2016 03:30
FOSUserBundleで作られるuserテーブルのスキーマが思ってたんとちがう場合に確認すること ref: http://qiita.com/pinekta/items/8ee7ca494f5eaac89d46
$ composer require friendsofsymfony/user-bundle
<?php
/**
$targets に記載されたメソッド名よりsetter/getterを生成します
*/
$targets = [
"FooName",
"BarName"
];
@pinekta
pinekta / phpenv_install.md
Last active August 16, 2018 16:26
CentOS6.7または7.1でのphpenvインストール手順

CentOS6.7または7.1でのphpenvインストール手順

phpenvのインストール手順

phpenv はユーザ・ディレクトリごとに使用するPHPを選択することができます。 また、簡単に使用するPHPのバージョンを変更することができます。

各環境ごとにPHPをビルドしたものを適用するため、 phpenvを利用するにはPHPをビルドできるようにする必要があります。

@pinekta
pinekta / gulp_install_package.json
Created August 18, 2015 01:18
For gulp install package.json
{
"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",