From 0ad44d2a13ce00cc7187c71673e0255c8e2cfa2e Mon Sep 17 00:00:00 2001 From: Mohamed Jinas Date: Fri, 2 Oct 2020 02:57:58 +0500 Subject: [PATCH] Namespace blade component --- app/View/Components/NamespaceComponent.php | 36 +++++++++++++++++++ .../components/namespace-component.blade.php | 22 ++++++++++++ resources/views/namespaces/index.blade.php | 31 ++++------------ resources/views/namespaces/show.blade.php | 4 +-- 4 files changed, 66 insertions(+), 27 deletions(-) create mode 100644 app/View/Components/NamespaceComponent.php create mode 100644 resources/views/components/namespace-component.blade.php diff --git a/app/View/Components/NamespaceComponent.php b/app/View/Components/NamespaceComponent.php new file mode 100644 index 0000000..e5eb7e8 --- /dev/null +++ b/app/View/Components/NamespaceComponent.php @@ -0,0 +1,36 @@ +name = $name; + $this->color = $color; + $this->key = $key; + $this->description = $description; + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\View\View|string + */ + public function render() + { + return view('components.namespace-component'); + } +} diff --git a/resources/views/components/namespace-component.blade.php b/resources/views/components/namespace-component.blade.php new file mode 100644 index 0000000..c9ad00f --- /dev/null +++ b/resources/views/components/namespace-component.blade.php @@ -0,0 +1,22 @@ +
+ + +
\ No newline at end of file diff --git a/resources/views/namespaces/index.blade.php b/resources/views/namespaces/index.blade.php index c9c71ee..5d3a973 100644 --- a/resources/views/namespaces/index.blade.php +++ b/resources/views/namespaces/index.blade.php @@ -21,33 +21,14 @@
@foreach (config('karudhaas.topic_filters') as $key => $namespace) - + @endforeach - - -
@endsection \ No newline at end of file diff --git a/resources/views/namespaces/show.blade.php b/resources/views/namespaces/show.blade.php index b835003..ea60483 100644 --- a/resources/views/namespaces/show.blade.php +++ b/resources/views/namespaces/show.blade.php @@ -1,7 +1,7 @@ @extends('layouts.app') @section('content') - + @endsection \ No newline at end of file