Codegrounds /fuel/packages/oil/views/scaffolding/orm/actions/delete.php

Language PHP Lines 16
MD5 Hash 514232df12f547f3022c37b7241d1cc9 Estimated Cost $126 (why?)
Repository https://bitbucket.org/trujka/codegrounds.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
		is_null($id) and Response::redirect('<?php echo $uri ?>');

		if ($<?php echo $singular_name; ?> = Model_<?php echo $model_name; ?>::find($id))
		{
			$<?php echo $singular_name; ?>->delete();

			Session::set_flash('success', 'Deleted <?php echo $singular_name; ?> #'.$id);
		}

		else
		{
			Session::set_flash('error', 'Could not delete <?php echo $singular_name; ?> #'.$id);
		}

		Response::redirect('<?php echo $uri; ?>');
Back to Top