From c22973a3fb4fc0efff763ce6fa6d126c2091e372 Mon Sep 17 00:00:00 2001 From: Shane Glee Date: Sun, 12 May 2019 20:15:17 +0100 Subject: [PATCH] added support for laravel 4 --- src/Laravel4CoreServiceProvider.php | 30 ++++++++++++++ src/Page.php | 2 - src/helpers.php | 8 ++++ src/views_4/button.blade.php | 15 +++++++ src/views_4/button_group_dropdown.blade.php | 18 ++++++++ src/views_4/image_button.blade.php | 6 +++ src/views_4/page.blade.php | 46 +++++++++++++++++++++ src/views_4/post_button.blade.php | 6 +++ 8 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 src/Laravel4CoreServiceProvider.php create mode 100644 src/helpers.php create mode 100644 src/views_4/button.blade.php create mode 100644 src/views_4/button_group_dropdown.blade.php create mode 100644 src/views_4/image_button.blade.php create mode 100644 src/views_4/page.blade.php create mode 100644 src/views_4/post_button.blade.php diff --git a/src/Laravel4CoreServiceProvider.php b/src/Laravel4CoreServiceProvider.php new file mode 100644 index 0000000..89a4be7 --- /dev/null +++ b/src/Laravel4CoreServiceProvider.php @@ -0,0 +1,30 @@ +isButton()) + +@else + attributes() }}> + @if($button->getIcon() != '') + + @endif + {{ $button->getText() }} + +@endif \ No newline at end of file diff --git a/src/views_4/button_group_dropdown.blade.php b/src/views_4/button_group_dropdown.blade.php new file mode 100644 index 0000000..91f30cc --- /dev/null +++ b/src/views_4/button_group_dropdown.blade.php @@ -0,0 +1,18 @@ +
+ @if($button->isButton()) + + @else + attributes() }}>{{ $button->getText() }} + @endif + + +
diff --git a/src/views_4/image_button.blade.php b/src/views_4/image_button.blade.php new file mode 100644 index 0000000..6d7f176 --- /dev/null +++ b/src/views_4/image_button.blade.php @@ -0,0 +1,6 @@ +@if($button->isButton()) + +@else + attributes() !!}> +@endif + diff --git a/src/views_4/page.blade.php b/src/views_4/page.blade.php new file mode 100644 index 0000000..3a98d44 --- /dev/null +++ b/src/views_4/page.blade.php @@ -0,0 +1,46 @@ +@extends('layouts.app') + +@section('content') +
+ + @if(Config::get('app.debug')) + @if(isset($dev_errors) && count($dev_errors) > 0) + @foreach($dev_errors as $error) +
+ Developer Notice + {{ $error }} +
+ @endforeach + @endif + @endif + + @section('page_content') + @if(isset($data_dump)) +
+
+
{{ json_encode($data_dump,JSON_PRETTY_PRINT | JSON_HEX_TAG) }}
+
+
+ @endif + @show +
+@endsection \ No newline at end of file diff --git a/src/views_4/post_button.blade.php b/src/views_4/post_button.blade.php new file mode 100644 index 0000000..6b77d02 --- /dev/null +++ b/src/views_4/post_button.blade.php @@ -0,0 +1,6 @@ +{{ Form::open(['url' => $button->getRoute(),'style' => 'display:inline-block;']) }} +@foreach($button->data() as $key => $value) + {{ Form::hidden($key, $value) }} +@endforeach + +{{ Form::close() }}