how to define variable in laravel controller code example Example: global variable in laravel controller private $variable;