Category Archives: PHP

Static variable in a class

 

Rules to validate password

 

Disable Csrf Token

Modify this middleware: VerifyCsrfToken.php

Reference:

Show last query

Reference:

Define BASE_URL globally

/app/Providers/AppServiceProvider.php

 

Group Example

 

Laravel in IIS (url rewrite example)

Notes:

  1. Destination in IIS should point to public folder
  2. Avoid creating folders in public with the same name as prefix in routes.
    e.g. public/admin and URI “/admin” will cause error.

 

Laravel helpers (composer)

Add “files” in composer.json:

Update autoload.php

Reference:

  1. https://kejyuntw.gitbooks.io/laravel-5-learning-notes/services/helpers/services-custom-helpers-README.html