add changelog on home
add HomeController change home route to use guest middleware
This commit is contained in:
parent
b7bbcab5d4
commit
46d77f5303
7 changed files with 89 additions and 10 deletions
4
CHANGELOG.md
Normal file
4
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#### 30.07
|
||||
- Ajout changelog
|
||||
- Ajout footer infos
|
||||
- Correction couleurs
|
||||
16
app/Http/Controllers/HomeController.php
Normal file
16
app/Http/Controllers/HomeController.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Parsedown;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function home()
|
||||
{
|
||||
$Parsedown = new Parsedown();
|
||||
$changelog = $Parsedown->text(File::get(\app_path('../CHANGELOG.md')));
|
||||
return view('home', ['changelog' => $changelog]);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/home';
|
||||
public const HOME = '/ticket';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"doctrine/dbal": "^3.1",
|
||||
"erusev/parsedown": "^1.7",
|
||||
"fideloper/proxy": "^4.4",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
|
|
|
|||
52
composer.lock
generated
52
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "5a8f79c46916ad9100d6accc3cdefacf",
|
||||
"content-hash": "03b4961bbf5b8266d0317365ce892a88",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
|
@ -840,6 +840,56 @@
|
|||
],
|
||||
"time": "2020-12-29T14:50:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.7.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
|
||||
"reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Parsedown": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Emanuil Rusev",
|
||||
"email": "hello@erusev.com",
|
||||
"homepage": "http://erusev.com"
|
||||
}
|
||||
],
|
||||
"description": "Parser for Markdown.",
|
||||
"homepage": "http://parsedown.org",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/erusev/parsedown/issues",
|
||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
||||
},
|
||||
"time": "2019-12-30T22:54:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "facade/flare-client-php",
|
||||
"version": "1.8.1",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,19 @@
|
|||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h2>Bienvenue sur le support LDC WEB.</h2>
|
||||
<p>Pour consulter vos tickets, merci de vous connecter : <a href="{{ route('login') }}">Connexion</a></p>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h1>Bienvenue sur le support LDC WEB.</h1>
|
||||
<p>Pour consulter vos tickets, merci de vous connecter : <a href="{{ route('login') }}">Connexion</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<h3>Changements</h3>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col">
|
||||
{!! $changelog !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\FileController;
|
||||
use App\Http\Controllers\HomeController;
|
||||
use App\Http\Controllers\LogController;
|
||||
use App\Http\Controllers\LoginController;
|
||||
use App\Http\Controllers\ProjectController;
|
||||
|
|
@ -20,12 +21,7 @@ use Illuminate\Support\Facades\Route;
|
|||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
if (auth()->check()) {
|
||||
return redirect()->route('ticket.index');
|
||||
}
|
||||
return view('home');
|
||||
})->name("home");
|
||||
Route::get('/', [HomeController::class, 'home'])->middleware('guest')->name('home');
|
||||
Route::get('/login', [LoginController::class, 'index'])->name('login');
|
||||
Route::post('/login', [LoginController::class, 'authenticate'])->name('authenticate');
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue