PHP Class App\Http\Controllers\CommentsController

Inheritance: extends Controller
Afficher le fichier Open project: appkr/l5essential Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
destroy ( Illuminate\Http\Request $request, integer $id ) : Illuminate\Http\Response Remove the specified resource from storage.
recursiveDestroy ( App\Comment $comment ) : boolean | null Delete comment recursively
store ( Illuminate\Http\Request $request ) : Illuminate\Http\Response Store a newly created resource in storage.
update ( Illuminate\Http\Request $request, integer $id ) : Illuminate\Http\Response Update the specified resource in storage.
vote ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse Vote up or down for the given comment.

Méthodes protégées

Méthode Description
deleteVote ( $votes ) Delete given votes collection.

Method Details

__construct() public méthode

public __construct ( )

deleteVote() protected méthode

Delete given votes collection.
protected deleteVote ( $votes )
$votes

destroy() public méthode

Remove the specified resource from storage.
public destroy ( Illuminate\Http\Request $request, integer $id ) : Illuminate\Http\Response
$request Illuminate\Http\Request
$id integer
Résultat Illuminate\Http\Response

recursiveDestroy() public méthode

Delete comment recursively
public recursiveDestroy ( App\Comment $comment ) : boolean | null
$comment App\Comment
Résultat boolean | null

store() public méthode

Store a newly created resource in storage.
public store ( Illuminate\Http\Request $request ) : Illuminate\Http\Response
$request Illuminate\Http\Request
Résultat Illuminate\Http\Response

update() public méthode

Update the specified resource in storage.
public update ( Illuminate\Http\Request $request, integer $id ) : Illuminate\Http\Response
$request Illuminate\Http\Request
$id integer
Résultat Illuminate\Http\Response

vote() public méthode

Vote up or down for the given comment.
public vote ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse
$request Illuminate\Http\Request
$id
Résultat Illuminate\Http\JsonResponse