Category Archives: PHP

UserC for Laravel-Permission

Example

 

RoleC for Laravel-Permission

Example

 

There is no role with id `123` Issue

With laravel-permission package, if you wanna delete a role and the role name is “123”, it seems the package will find it by ID automatically because it’s numerical.

Solution:

Change name from “123” to “v123”, etc.

Share data to all views

Middleware

Kernel

 

Jquery Repeater

Github:

https://github.com/DubFriend/jquery.repeater

Javascript

HTML

 

Product Catalog for Facebook

Use XMLWriter

Black list to hide .env values from debug mode

Append this array to config/app.php

 

Upload Multiple Images

HTML

Laravel:

 

Response with UTF-8 format without Encode Chinese Chars

Example

Reference:

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.