Skip to content

PHP code snippet – How to call a function in model from a controller?

ModelName::FunctionName(Parameters);

make sure the function in the model is static
See also  PHP code snippet - How to collapse array in laravel?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.