web.php
<?php
use IlluminateSupportFacadesRoute;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', [AppHttpControllersHomeController::class, 'index'])->name('home');
Auth::routes();
Route::get('/pingu/{id}', [AppHttpControllersHomeController::class, 'pingu']);
Auth::routes();
Route::prefix('jobs')->group(function(){
Route::get('create', function () {
return "create";
});
Route::get('update', function () {
return "update";
});
});
TaskController.php
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
class TaskController extends Controller
{ public function create(){
return view ('create');
}
}
create.blade.php`
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>
<div class="card-body">
<form action="{{route('jobs.store')}}" method="POST">
<input type="text" name="title" class="form-control">
<button type="submit" class="btn btn-success">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
I did exactly what to do in the turtorial but it dind't appear , please find fix that works. I use laravel 8 i tried to config :cache clear a nd then artisan serve again butdind't work .If you know a laravel enough ( 8 ) you should know that everything is done right .
Picture 1
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…