RainLab Plugin Builder Issues With Reordering
I'm trying to use the RainLab Plugin Builder and I'm having an issue when trying to reorder a series of inputted information.
At first, I was getting an error of...
"The model must implement the NestedTree or Sortable Trait."
So I looked at October CMS documentation for reordering and added use \October\Rain\Database\Traits\Sortable; to the plugin model. Now I'm getting the error of...
"Unknown column 'sort_order' in 'order clause' (SQL: select * from jcbbuller_projects_ order by sort_order asc)"
Is this because I didn't implement the sortable model trait until after I had inputted information into the fields? I have three test items pushed to this plugin's database so far, just to test out the reordering function.
Your table is missing
Please read this manual : https://octobercms.com/docs/database/traits#sortable
from plugin builder just add
sort_order column and default it to
0. in migration file it should look like below code for
if any doubt please comment.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?