PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   Heloise Laravel Blog Package   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Heloise Laravel Blog Package
Simple blog system with comments and RSS feed
Author: By
Last change:
Date: 1 year ago
Size: 587 bytes
 

Contents

Class file image Download
<?php

Route
::get('/', 'PostController@index')->name('homepage');

// Redirect /home to root path used in Auth Middleware
Route::get('/home', function () {
    return
redirect('/');
});

Auth::routes();
Route::resource('/post','PostController', ['except' => ['index']]);
Route::get('/post/{postId}/add-comment','CommentController@create')->where('postId', '[0-9]+')->name('comment.create');
Route::post('/post/{postId}/submit-comment','CommentController@store')->where('postId', '[0-9]+')->name('comment.store');
Route::get('/feed', 'PostFeedController@index')->name('post.feed.index');