ของดี อันใหม่ที่มีใน Laravel 11 ถ้าออกแบบ database ไว้โดยคนเดียวกัน จะรู้สึกได้ว่า column มันจะมีความคล้าย ๆ กัน อย่าง column id, enable, title, created_at, updated_at เวลาเขียน code ก็เหมือนกัน อย่างต้องการแสดง option ใน select box ก็จะเขียนออกมาคล้าย ๆ กัน เช่น
PHP
/** * Get the options for the select input * * @return \Illuminate\Database\Eloquent\Collection */ public static function getOptions () { return self::where ('enable', true) ->orderBy ('title') ->get (['title as text', 'id as value']) ; }