Monthly Archives: May 2020

Laravel Mail Bugs

  1. Some variable failed to pass to Mailable objects for unknown reason.
    Laravel 6.x seems to fix this issue.
  2. url() helper will use APP_URL in .env. url() won’t use this in controllers.

Datatable Complete Example

Controller

Model

Javascript (index.js)

AjaxResponse Trait

 

Set Different Root for Users (ResponsiveFilemanager)

The key is

https://www.responsivefilemanager.com/#documentation-section

But in Laravel , you can’t use $_SESSION, so need to change dialog.php of responsivefilemanager

Bug

If users have different permission (root folder), change account could cause error.
Line #150~ shoud be modified.

 

Laravel custom authentication

Query user by credential

 

Reference:

Scroll Spy (Fixed footer)

Use  fixed on mobile could cause wrong position for unknown reason. Change value of “position” property should be the best solution.

 

Align text to bottom of a div

Use flex:

CSS:

Reference:

Google Sign-in for Websites

Javascript Example

PHP (Laravel)

Reference:

Facebook Login (Javascript)

Sample Javascript:

PHP Example (Laravel)

Reference: