Search
 
SCRIPT & CODE EXAMPLE
 

PHP

codeigniter 4 delete redirect with data

// codeigniter 4 delete with redirect data
public function deletePet($id) {
 $pet = new Pets(); // Model
 $pet->delete($id); // delete data using id
        
 return redirect()->to('/user/pets')->with('success', 'Pet deleted successfully');
}
Comment

codeigniter 4 delete redirect with data

//display the " ->with() in front-end
 <?php if(session()->get('success')): ?>
    <div class="alert alert-success" role="alert">
         <?= session()->get('success') ?>
    </div>
<?php endif; ?>
Comment

PREVIOUS NEXT
Code Example
Php :: php http method 
Php :: laravel logs 
Php :: how to debug in wordpress 
Php :: laravel passport client 
Php :: laravel check if api request 
Php :: rewrite url to exclude php extension 
Php :: php declare array 
Php :: php execute command and display output 
Php :: Cambiar la imagen por defecto en producto WooCommerce 
Php :: contact form 7 remove br 
Php :: php function to remove null or 0 value from array 
Php :: html in php 
Php :: googlee traduction 
Php :: How do you set a variable to an integer? in php 
Php :: ajax search request 
Php :: valet select php version 
Php :: dd php 
Php :: laravel count array 
Php :: php remove value from array 
Php :: wordpress popular posts query 
Php :: laravel passport Route [login] not defined 
Php :: how to run a php file in xampp 
Php :: Movie Name -inurl:(htm|html|php|pls|txt) intitle:index.of “last modified” (mp4|wma|aac|avi) 
Php :: wp-config for production 
Php :: laravel update multiple select query 
Php :: global variable in laravel controller 
Php :: how to use union and intersection in laravel query 
Php :: laravel basic login 
Php :: change or set post type wordpress 
Php :: Automatic Subdomain with PHP 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =