Свойство | Type | Description | |
---|---|---|---|
$blog | BlogRepository object. | ||
$comment | CommentRepository object. |
Méthode | Description | |
---|---|---|
__construct ( |
BlogController constructor. | |
backIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | For back-end posts index. | |
body ( Illuminate\Http\Request $request, string $id ) : Illuminate\Contracts\View\Factory | Illuminate\Http\JsonResponse | Illuminate\View\View | Get post body through ajax or redirect to 404. | |
comments ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse | Get comments belong to post gotten by {id} | |
create ( ) : Illuminate\Http\Response | Show the form for creating a new resource. | |
destroy ( integer $id ) : Illuminate\Http\Response | Remove the specified resource from storage. | |
edit ( integer $id ) : Illuminate\Http\Response | Show the form for editing the specified resource. | |
favorite ( Illuminate\Http\Request $request, $id ) | ||
frontIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | Display posts list order by created_at This controller return posts shown in collapsible view. | |
getUpload ( ) | Get upload page | |
index ( ) : Illuminate\Http\Response | Get all posts and make pagination. | |
normalIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | Unlike 'frontIndex', this action used to show normal list of posts and post clicked will be shown in a single page. | |
publish ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse | Toggle post published status. | |
search ( Illuminate\Http\Request $request ) : Illuminate\Contracts\View\Factory | Illuminate\Http\RedirectResponse | |
Search in all posts. | |
show ( string $slug ) : Illuminate\Http\Response | Display the specified resource. | |
store ( |
Store a newly created resource in storage. | |
update ( Illuminate\Http\Request $request, integer $id ) : Illuminate\Http\Response | Update the specified resource in storage. | |
upload ( Illuminate\Http\Request $request ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | Upload File with Markdown Form. |
public __construct ( |
||
$blog | ||
$comment |
public backIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | ||
Résultat | Illuminate\Contracts\View\Factory | Illuminate\View\View |
public body ( Illuminate\Http\Request $request, string $id ) : Illuminate\Contracts\View\Factory | Illuminate\Http\JsonResponse | Illuminate\View\View | ||
$request | Illuminate\Http\Request | |
$id | string | format: post-{id} |
Résultat | Illuminate\Contracts\View\Factory | Illuminate\Http\JsonResponse | Illuminate\View\View |
public comments ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse | ||
$request | Illuminate\Http\Request | |
$id | ||
Résultat | Illuminate\Http\JsonResponse |
public create ( ) : Illuminate\Http\Response | ||
Résultat | Illuminate\Http\Response |
public favorite ( Illuminate\Http\Request $request, $id ) | ||
$request | Illuminate\Http\Request |
public frontIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | ||
Résultat | Illuminate\Contracts\View\Factory | Illuminate\View\View |
public index ( ) : Illuminate\Http\Response | ||
Résultat | Illuminate\Http\Response |
public normalIndex ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | ||
Résultat | Illuminate\Contracts\View\Factory | Illuminate\View\View |
public publish ( Illuminate\Http\Request $request, $id ) : Illuminate\Http\JsonResponse | ||
$request | Illuminate\Http\Request | |
$id | ||
Résultat | Illuminate\Http\JsonResponse |
public search ( Illuminate\Http\Request $request ) : Illuminate\Contracts\View\Factory | Illuminate\Http\RedirectResponse | |
||
$request | Illuminate\Http\Request | |
Résultat | Illuminate\Contracts\View\Factory | Illuminate\Http\RedirectResponse | |
public store ( |
||
$request | ||
Résultat | Illuminate\Http\Response |
public upload ( Illuminate\Http\Request $request ) : Illuminate\Contracts\View\Factory | Illuminate\View\View | ||
$request | Illuminate\Http\Request | |
Résultat | Illuminate\Contracts\View\Factory | Illuminate\View\View |
protected PostRepository,App\Repositories $blog | ||
Résultat |