amaelftah/laravel-trix

Render not working all methods

phuongphally opened this issue · 6 comments

<!-- inside view blade file -->

@trix($post, 'content')

{!! $post->trix('content') !!} //must use HasRichText trait in order for $model->trix() method work

{!! app('laravel-trix')->make($post, 'content') !!}

I use form share --create --and -- update

<div class="form-group row">
    <label for="name" class="col-2 col-form-label">Content</label>
    <div class="col-10">
            @trix(isset($advertise)? $advertise: \App\Entities\Advertise::class, 'content')
    </div>
</div>

@phuongphally have you put @trixassets in the header ?

I already used

@phuongphally ok so is trix editor isn't showing at all . or only not showing when you use model object $advertise ?

It show when create screen. And not show when update screen

@phuongphally can you try to use another $model object . or if you are using vue js then you will need to do this

 <div id="app">
     <template>
       @trix(\App\User::class,'content')
    </template>
 </div>

i will close this issue since it's not a bug with the package . and possible something related to the application logic .

Thanks