Laravel Commands

Laravel Framework version 5.0.33

Command สำหรับแสดงคำสั่งทั้งหมดที่สามารถใช้ได้

php artisan list

 

Command ที่ใช้บ่อยๆ
Listing Your Routes

php artisan route:list

Create controller

php artisan make:controller Api/HelperController

Create model

php artisan make:model Customers

Android: Hide and Show soft keyboard

     /**
     * Hides the soft keyboard
     */
    public void hideSoftKeyboard() {
        if(getCurrentFocus()!=null) {
            InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
            inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
        }
    }

    /**
     * Shows the soft keyboard
     */
    public void showSoftKeyboard(View view) {
        InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
        view.requestFocus();
        inputMethodManager.showSoftInput(view, 0);
    }