aksld
1
Hello,
I’m trying out this doc to create a Blade component.
It works perfectly.
However, I want to integrate a style sheet into this component.
The style sheet is dedicated to this component.
I can’t find the right way to do it:
Thanks for your help
aksld
2
I’ve tried something, but it hasn’t worked yet:
app.blade.php
<style>
@stack('css')
</style>
<script>
@stack('js')
</script>
In my component :
@push('css')
<link rel="stylesheet" href="<?php echo asset( 'component_older_events' ); ?>">
@endpush
On the front I can see the right style. The file is accessible.
But the CSS doesn’t apply.
Thank you for your help
aksld
3
I finally managed it by slipping into the .
Whether this is good practice remains to be seen.