alexlancer / auto-crud-generator-codeigniter-4- Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I think you need a delete button in the listing pages. I myself added it to the crud_core file.
Line: 1168
Change this line:
$table .= '<td class="text-center"><a href="' . $this->base . '/' . $this->table . '/edit/' . $item->{$primary_key} . '" class="btn btn-success btn-sm">Edit</a></td>';
To:
$table .= '<td class="text-center"><a href="' . $this->base . '/' . $this->table . '/edit/' . $item->{$primary_key} . '" class="btn btn-success btn-sm">Edit</a>'; $table .= '<a onclick="return confirm(\'Are you sure you want to delete this record?\')" class="btn btn-danger btn-sm ml-2" href="' . $this->base . '/' . $this->table . '/delete/' . $item->{$primary_key} . '">Delete</a>'; $table .= '</td>';
I wanted to add for those who want to do.
How To Add Dynamic Row have An Different color in the list of module
how with database
In Crud_core.php, if field needs to be hashed the field name is hashed instead of the field value. Can be fixed by replacing
$post[$hashIt] = password_hash($hashIt, PASSWORD_DEFAULT);
with
$post[$hashIt] = password_hash($post[$hashIt], PASSWORD_DEFAULT);
on line 288
Undefined variable: affected
APPPATH/Libraries/Crud_core.php at line 398
391 $insertedFilesAffectedRows = false;
392 if ($filesData) {
393 foreach ($filesData as $fileDataKey => $fileDataOptions) {
394 $insertedFilesAffectedRows = $this->filesHandler($fileDataKey, $fileDataOptions);
395 }
396 }
397
398 if ($insertedFilesAffectedRows || $affected || $toDelete || $toInsert)
399 $this->flash('success', 'Successfully Updated');
400 else
401 $this->flash('warning', 'The record was not updated or no changes were made');
402
403 return ['redirect' => $this->base . '/' . $this->table . '/edit/' . $this->id];
404 } else {
Most of the Codeigniter4 validation rules are not working e.g. max_length, min_length, alpha_space, decimal, numeric, etc.
https://codeigniter4.github.io/userguide/libraries/validation.html#available-rules
Using the add function of any controller using Crud gives error:
Undefined variable: affected APPPATH\Libraries\Crud_core.php at line 398
Hi, thanks for this project it's very helpful
i got this error
invalid rules exception at line 270
270 if ($this->validator->withRequest($this->request)->run() || $novalidation) //|| empty($this->fields)
is there any solution ,
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.