アプリ関連ニュース

Laravel Tips

今回も、laravelのTipsをいくつか紹介します。

①別のカラムの後にカラムを追加したい場合は、afterメソッドを使用することができます。

<?php
     Schema::table('users', function(Blueprint $table){
        $table->after('email', function($table){
            $table->integer('status');
            $table->string('address');
            $table->string('city');
            $table->string('state');
         });
     });

②与えられた値がfilledかblankかを判断したい場合は、 empty()is_null() などの代わりに、ヘルパー関数 filled() を使うことができます。

filled(0);
filled(true);
filled(false);

//return true


filled('');
filled(' ');
filled(null);
filled(collection());

//return false

ということで、今回はこれで終わります。

金曜担当 – Ami



Emmetの使用(2)

今回はHTMLマークアップを効率的に記述することができる
Emmet(エメット)を紹介したいと思います。
本記事は前回の「Emmetの使用(1)」の続きとなります。

続きを読む

Top 5 Node JS Frameworks

Today I would like to share about top 5 Node JS frameworks. Let’s take a look.

1. express.js

Express.js is the most popular Node.js backend framework. It is mainly used for building backend applications and REST APIs.

2. nest.js

Nest.js is a powerful framework for building a scalable backend applications. It supports TypeScript fully. The architecture is clear and there are good documentations.

3. fastify.js

Fastify.js is a web framework and provides one of the fastest developer experiences with good optimizations.

4. sails.js

Sails.js is a backend framework that uses model-view-controller methodology for developing Node JS applications and APIs. It is mostly used for designing and developing custom enterprise level.

5. socket.io

Socket.io is a JavaScript library that is used for real-time even-based communications. It is a good framework to use for real-time messaging or broadcasting applications.

This is all for now. Hope you enjoy that.

By Asahi



ブレードで@.jsディレクティブを使用してPHPからJavascriptの値に変換する。

今回は、laravelのTipsを紹介します。

@.js は、PHP の値を Javascript に変換できます。

また、laravelアプリケーションのとこかの場所でこれを行いたい場合は、facadeを直接呼び出すことも可能です。

use Illuminate\Support\Js;

$data = ['name' => 'mg mg'];

Js::from($data);
Js::from(collect($data));

//blade 直接
@js($data);

ということで、今回はこれで終わります。

金曜担当 – Ami



Emmetの使用(1)

今回はHTMLマークアップを効率的に記述することができる
Emmet(エメット)を紹介したいと思います。

続きを読む

アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム