laravel-theme icon indicating copy to clipboard operation
laravel-theme copied to clipboard

how can i create my custom-js on views ?

Open oguzcicek opened this issue 10 years ago • 2 comments

Normally , i can create @yield('custom-js') on master blade and use it in my views like @section('custom-js') and i can write my custom-js codes on views

So how can i do it with laravel-theme ? i couldnt get the idea... Any example ?

oguzcicek avatar Feb 23 '15 13:02 oguzcicek

Please read in https://github.com/teepluss/laravel-theme#basic-usage-of-assets.

Scroll down and find "Writing in-line style or script".

ethaizone avatar Mar 04 '15 14:03 ethaizone

I have the same issue. I need to send section('js) to layout @yield('js') to use jsvalidation, like this:

@section('js')
    <script type="text/javascript" src="{{ asset('vendor/jsvalidation/js/jsvalidation.js')}}"></script>
    {!! JsValidator::formRequest('App\Http\Requests\CreateAccount') !!}
@endsection

ivenspontes avatar Feb 02 '18 05:02 ivenspontes