hsntngr
138
2
Laravel

Laravel - js sections of different blade files making conflict

Posted 6 months ago by hsntngr

I have two blade file and both of them has js section. But in the browser, shows only comments js files not single. I need to use both js files.

Here are blade files in a nutshell

comments.blade

// php and html codes
@section("js")
 // js codes of comments blade
@endsection

single.blade

@extends("master")
@section("content")
 // html and php codes 
 @include("comments")
@endsection
@section("js")
 // js codes of single blade
@endsection

Why there are conflict between two blade file ? And how do I fix it ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.