skip to Main Content

Laravel – How to delete data properly?

This is my delete button <!-- Hapus Data --> <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs- target="#exampleModal"> Hapus </button> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel"> Apakah anda yakin…

VIEW QUESTION

Put Route returns CSRF token mismatch Laravel

I am trying to configure a crud api for a blog and right now i made the PostController like this: <?php namespace AppHttpControllers; use AppModelsPost; use AppHttpRequestsStorePostRequest; use IlluminateHttpRequest; class PostController extends Controller { /** * Display a listing of…

VIEW QUESTION

Data not returned in variable using Laravel's View Composer

I'm using view composer in Laravel as follows: namespace AppProviders; use IlluminateSupportServiceProvider; use IlluminateSupportFacadesView; use AppModelsGreen; use AppModelsBlue; class SidebarServiceProvider extends ServiceProvider { public function boot(): void { View::composer('layouts.sidebar', function ($view) { $dataGreen = Green::all(); $dataBlue = Blue::all(); $view->with([ 'green'…

VIEW QUESTION
Back To Top
Search