diff --git a/README.md b/README.md index 783a801..29390f0 100644 --- a/README.md +++ b/README.md @@ -134,8 +134,37 @@ class HasMetaModel extends Resource #### Front +You can use de Facade ModelHasMeta to display the meta of a model. +In your controller : +```php +class HasModelController extends Controller +{ + public function show($id) + { + $model = HasMetaModel::find($id); + ModelHasMeta::setModel($model); + + return view('has-meta', compact('model')); + } +} +``` + +In the view : + +```php +@section('metas') + {{ \Novius\LaravelMeta\Facades\ModelHasMeta::renderMeta() }} +@endsection + + +
+

{{ $model->title }}

+

{{ $model->description }}

+
+
+``` ### Testing