then run migration but there was nothing to migrate
namespace App\Models;
use \DateTimeInterface;
use App\Traits\Auditable;
use Dotlogics\Grapesjs\App\Contracts\Editable;
use Dotlogics\Grapesjs\App\Traits\EditableTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media;
class ContentPost extends Model implements HasMedia,Editable
{
use SoftDeletes;
use InteractsWithMedia;
use Auditable;
use HasFactory;
use EditableTrait;
---
namespace App\Http\Controllers\Admin;
use ..
class ContentPostController extends Controller
{
use MediaUploadingTrait;
use CsvImportTrait;
use EditorTrait;
public function editor(Request $request, ContentPost $page)
{
return $this->show_gjs_editor($request, $page);
}
--
Now page is working but on saving response is 500 of course because of no columns
{
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gjs_data' in 'field list' (SQL: update `content_posts` set `gjs_data` = {\"components\":\"[{\\\"type\\\":\\\"text\\\",\\\"content\\\":\\\"
Amazing tool , lets,see what we can do?<\\/p>\\\\n\\\",\\\"attributes\\\":{\\\"id\\\":\\\"iznd\\\"}},{\\\"type\\\":\\\"text\\\",\\\"components\\\":[{\\\"type\\\":\\\"textnode\\\",\\\"content\\\":\\\"\\\\n\\\\tExample Template\\\\n\\\"}]},{\\\"type\\\":\\\"text\\\",\\\"components\\\":[{\\\"type\\\":\\\"textnode\\\",\\\"content\\\":\\\"Example Block\\\"}]}]\",\"styles\":\"[{\\\"selectors\\\":[\\\"#iznd\\\"],\\\"style\\\":{\\\"padding\\\":\\\"10px\\\"}}]\",\"css\":\"* { box-sizing: border-box; } body {margin: 0;}#iznd{padding:10px;}\",\"html\":\"
Amazing tool , lets,see what we can do?<\\/p>\\n<\\/div>
\\n\\tExample Template\\n<\\/div>
Example Block<\\/div><\\/body>\"}, `content_posts`.`updated_at` = 2022-10-06 12:57:00 where `id` = 1)",
"exception": "Illuminate\\Database\\QueryException",
"file": "C:\\xampp\\htdocs\\coai\\laravel\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",
"line": 712,
"trace": [
{
"file"
followed the following steps
then run migration but there was nothing to migrate
then fixed the issue to support 7.4 as per
https://github.com/jd-dotlogics/laravel-grapesjs/pull/49
Now page is working but on saving response is 500 of course because of no columns