Route::middleware('web')
->group([base_path('routes/web.php'), base_path('routes/admin.php')]);
Route::prefix('admin')->middleware('web')->name('admin.')->group(function() {
});
DataExportController::class
use App\Http\Controllers\DataExportController;
MAIL_MAILER=sendmail
MAIL_SENDMAIL_PATH='C:\laragon\bin\sendmail\sendmail.exe -t -i'
@if (Route::has('login'))
@if (Route::has('register'))
method="POST"
Для PUT/POST/PATCH/DELETE<form action="{{ route('profile.update') }}" method="POST" enctype="multipart/form-data">
@csrf
{{-- @method('POST') --}}
@method('PUT')
.......................
</form>
<turbo-frame id="unread-frame" src="{{ route('sidebar') }}" loading="lazy">
<span class="uk-text-center uk-padding-small uk-display-block" uk-spinner></span>
</turbo-frame>
<script>
function ureadRefresh() {
document.getElementById('unread-frame').src = "{{ route('sidebar') }}";
}
document.addEventListener('DOMContentLoaded', () => setInterval(ureadRefresh, 10000));
document.addEventListener('turbo:frame-load', ureadRefresh);
</script>
Route::controller(PostController::class)->prefix('blog')->name('blog.')->group(function (){
...
Route::get('{id}-{alias}', 'show')->name('show');
...
});
public function show($id, $alias)
{
$post = Post::with('comments')->where(['id' => $id, 'alias' => $alias])->firstOrFail();
return view(config('cms.theme').'.posts.show', ['post' => $post]);
}