For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
git branch -m hoge foo
<?php | |
//管理者以外はログイン成功後ダッシュボードではなくトップページへ飛ばす | |
function redirect_login_front_page() { | |
if( !current_user_can('administrator') ){ | |
$home_url = site_url('', 'http'); | |
wp_safe_redirect($home_url); | |
exit(); | |
} | |
} |
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \