Skip to main content

Posts

Showing posts with the label PHP

Laravel 5.4 (and 5.5) native User Authentication + Role Authorization

A very brief step-by-step of how to implement a native Laravel 5.4 user authentication + role authorization. Starting from a fresh Laravel 5.4/5.5 installation, run the php artisan to create the Auth resource: $ php artisan make : auth Create the  Role  model and respective migration (-m parameter): $ php artisan make : model Role - m Edit  CreateRolesTable  class in the  migrations  folder: public function up () { Schema :: create (‘ roles ’, function ( Blueprint $table ) { $table -> increments (‘ id ’); $table -> string (‘ name ’); $table -> string (‘ description ’); $table -> timestamps (); }); } public function down () { Schema :: dropIfExists (‘ roles ’); } Create a new migration for the  role_user  pivot table : $ php artisan make : migration create_role_user_table Edit  CreateRoleUserTable  class in the  migrations  folder: public func...

Why does CSS file want name changes every time?

Another option for you could be to copy the contents of the CSS files to a static file hosted on your server. The file should have a name that would never change (like mouseflow.css). Mouseflow could then insert a reference to that file, to load the needed CSS. This is something I know they can do quite easily. You would need to manually update the static file, whenever major changes are made to the CSS on the livesite - but you wouldn't have to do it every time the file names changes. Source: Stackoverflow