Welcome Guest, Not a member yet? Register   Sign In
Using Event file
#1
Sad 
(This post was last modified: 03-16-2020, 09:31 AM by EtZeta.)

I don't understand how to use an Event with a separated file with the function Sad

for example

App/Config/Events.php


Quote:Events::on('pre_system', ['compress', 'compresstest']);

System/Events/compress.php


Quote:<?php
function compresstest()
{
console.log("Test");
}


I always have this error: ErrorException call_user_func() expects parameter 1 to be a valid callback, class 'compress' not found

Confused Huh
Reply


Messages In This Thread
Using Event file - by EtZeta - 03-16-2020, 09:28 AM
RE: Using Event file - by MGatner - 03-23-2020, 09:06 AM
RE: Using Event file - by EtZeta - 03-23-2020, 11:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB