diff --git a/l5scaffold.php b/l5scaffold.php new file mode 100644 index 0000000..f566a6c --- /dev/null +++ b/l5scaffold.php @@ -0,0 +1,20 @@ + 'Create', + 'edit' => 'Edit', + 'save' => 'Save', + 'input_errors' => 'There were some problems with your input.', + 'options' => 'OPTIONS', + 'view' => 'View', + 'empty' => 'No records.', + 'id' => 'ID', + 'delete' => 'Delete', + 'delete_confirmation' => 'Delete? Are you sure?', + 'back' => 'Back', + 'item_created' => 'Item created successfully.', + 'item_updated' => 'Item updated successfully.', + 'item_deleted' => 'Item deleted successfully.' +]; diff --git a/src/stubs/controller.stub b/src/stubs/controller.stub index de10be3..0d0796d 100644 --- a/src/stubs/controller.stub +++ b/src/stubs/controller.stub @@ -44,7 +44,7 @@ class {{class}} extends Controller { ${{model_name_var_sgl}}->save(); - return redirect()->route('{{model_name_var}}.index')->with('message', 'Item created successfully.'); + return redirect()->route('{{model_name_var}}.index')->with('message', trans('l5scaffold.item_created')); } /** @@ -88,7 +88,7 @@ class {{class}} extends Controller { ${{model_name_var_sgl}}->save(); - return redirect()->route('{{model_name_var}}.index')->with('message', 'Item updated successfully.'); + return redirect()->route('{{model_name_var}}.index')->with('message', trans('l5scaffold.item_updated')); } /** @@ -102,7 +102,7 @@ class {{class}} extends Controller { ${{model_name_var_sgl}} = {{model_name_class}}::findOrFail($id); ${{model_name_var_sgl}}->delete(); - return redirect()->route('{{model_name_var}}.index')->with('message', 'Item deleted successfully.'); + return redirect()->route('{{model_name_var}}.index')->with('message', trans('l5scaffold.item_deleted')); } } diff --git a/src/stubs/html_assets/create.stub b/src/stubs/html_assets/create.stub index 15fd57c..b8baba0 100644 --- a/src/stubs/html_assets/create.stub +++ b/src/stubs/html_assets/create.stub @@ -4,7 +4,7 @@ @endsection @section('header') @endsection @@ -19,8 +19,8 @@ {{content_fields}}
- - Back + + {{ trans('l5scaffold.back') }}
diff --git a/src/stubs/html_assets/edit.stub b/src/stubs/html_assets/edit.stub index b657016..564d554 100644 --- a/src/stubs/html_assets/edit.stub +++ b/src/stubs/html_assets/edit.stub @@ -4,7 +4,7 @@ @endsection @section('header') @endsection @@ -20,8 +20,8 @@ {{content_fields}}
- - Back + + {{ trans('l5scaffold.back') }}
diff --git a/src/stubs/html_assets/error.stub b/src/stubs/html_assets/error.stub index 166b234..a564000 100644 --- a/src/stubs/html_assets/error.stub +++ b/src/stubs/html_assets/error.stub @@ -1,10 +1,10 @@ @if (count($errors) > 0)
-

There were some problems with your input.

+

{{ trans('l5scaffold.input_errors') }}

-@endif \ No newline at end of file +@endif diff --git a/src/stubs/html_assets/index.stub b/src/stubs/html_assets/index.stub index c101cab..1fb2821 100755 --- a/src/stubs/html_assets/index.stub +++ b/src/stubs/html_assets/index.stub @@ -4,7 +4,7 @@ @@ -17,9 +17,9 @@ - + {{header_fields}} - + @@ -29,12 +29,12 @@ {{content_fields}} @@ -43,10 +43,10 @@
ID{{ trans('l5scaffold.id') }}OPTIONS{{ trans('l5scaffold.options') }}
{{${{classSingle}}->id}} - View - Edit -
+ {{ trans('l5scaffold.view') }} + {{ trans('l5scaffold.edit') }} + - +
{!! ${{class}}->render() !!} @else -

Empty!

+

{{ trans('l5scaffold.empty') }}

@endif -@endsection \ No newline at end of file +@endsection diff --git a/src/stubs/html_assets/show.stub b/src/stubs/html_assets/show.stub index 4c25d5f..1d4d2a5 100644 --- a/src/stubs/html_assets/show.stub +++ b/src/stubs/html_assets/show.stub @@ -2,12 +2,12 @@ @section('header') @@ -19,15 +19,15 @@
- +

{{content_fields}}
- Back + {{ trans('l5scaffold.back') }} -@endsection \ No newline at end of file +@endsection