Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In: App->Http->Livewire:
- AddPost.php
- > `php`
- namespace App\Http\Livewire;
- use Livewire\Component;
- class AddPost extends Component
- {
- public $title = "Blank";
- public $content = "Such empty here";
- public function render()
- {
- return view('livewire.add-post');
- }
- }
- //end
- IN: resources->views:
- add-post.blade.php
- <html>
- <head>
- @livewireStyles
- </head>
- <body>
- @livewire('add-post')
- @livewireScripts
- </body>
- </html>`
- //end
- IN: resources->views->livewire:
- add-post.blade.php
- <div>
- Title: {{ $title }}
- <br>
- Content: {{ $content }}
- </div>
Add Comment
Please, Sign In to add comment