PHP Class Learner\Http\Controllers\NewsletterController

Inheritance: extends BaseController
Mostra file Open project: RryLee/learner.video

Protected Properties

Property Type Description
$news Learner\Repositories\NewsRepositoryInterface Newsletter repository.
$subscribers Learner\Repositories\SubscriberRepositoryInterface Subscriber repository.

Public Methods

Method Description
__construct ( Learner\Repositories\SubscriberRepositoryInterface $subscribers, Learner\Repositories\NewsletterRepositoryInterface $news ) Instance subsciber repository.
index ( ) : Illuminate\View\View Get newsletters list.
show ( integer $id ) : Illuminate\View\View Show a newsletter.
subscribe ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse User subscribe to learner.
unsubscribe ( ) : Illuminate\Http\RedirectResponse User unsubscribe to learner.

Method Details

__construct() public method

Instance subsciber repository.
public __construct ( Learner\Repositories\SubscriberRepositoryInterface $subscribers, Learner\Repositories\NewsletterRepositoryInterface $news )
$subscribers Learner\Repositories\SubscriberRepositoryInterface
$news Learner\Repositories\NewsletterRepositoryInterface

index() public method

newsletters get
public index ( ) : Illuminate\View\View
return Illuminate\View\View

show() public method

newsletters/{id} get
public show ( integer $id ) : Illuminate\View\View
$id integer
return Illuminate\View\View

subscribe() public method

newsletters/subscribe post
public subscribe ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse
$request Illuminate\Http\Request
return Illuminate\Http\RedirectResponse

unsubscribe() public method

newsletters/unsubscribe post
public unsubscribe ( ) : Illuminate\Http\RedirectResponse
return Illuminate\Http\RedirectResponse

Property Details

$news protected_oe property

Newsletter repository.
protected NewsRepositoryInterface,Learner\Repositories $news
return Learner\Repositories\NewsRepositoryInterface

$subscribers protected_oe property

Subscriber repository.
protected SubscriberRepositoryInterface,Learner\Repositories $subscribers
return Learner\Repositories\SubscriberRepositoryInterface