アプリ関連ニュース
- 2022年8月05日
- 技術情報
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
asahi at 2022年08月05日 10:00:00
- 2022年8月04日
- 技術情報
Emmetの使用(2)
nishida at 2022年08月04日 10:00:00
- 2022年8月02日
- 技術情報
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
waithaw at 2022年08月02日 10:00:00
- 2022年7月29日
- 技術情報
ブレードで@.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
asahi at 2022年07月29日 10:00:00
- 2022年7月28日
- 技術情報
Emmetの使用(1)
nishida at 2022年07月28日 10:00:00