master

laravel/framework

Last updated at: 28/12/2023 01:32

channel.stub

TLDR

This file is a stub file that is used as a template for creating channels in the Illuminate/Foundation/Console/stubs directory. It contains a class definition for a channel, including a constructor method and a join method for authenticating user access to the channel.

Classes

ChannelStub

This class represents a channel and is used as a template for creating channel classes. It includes a constructor method that currently does not have any implementation. The class also includes a join method that takes a user object as a parameter and returns an array or a boolean value. The implementation of this method is not provided in the stub file.

<?php

namespace {{ namespace }};

use {{ namespacedUserModel }};

class {{ class }}
{
    /**
     * Create a new channel instance.
     */
    public function __construct()
    {
        //
    }

    /**
     * Authenticate the user's access to the channel.
     */
    public function join({{ userModel }} $user): array|bool
    {
        //
    }
}