Guest User

Untitled

a guest
Sep 17th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.62 KB | None | 0 0
  1. In: App->Http->Livewire:
  2.  
  3. AddPost.php
  4.  
  5. >   `php`
  6.    namespace App\Http\Livewire;
  7. use Livewire\Component;
  8. class AddPost extends Component
  9. {
  10.     public $title = "Blank";
  11.     public $content = "Such empty here";
  12.     public function render()
  13.     {
  14.         return view('livewire.add-post');
  15.     }
  16. }
  17. //end
  18.  
  19. IN: resources->views:
  20.  
  21. add-post.blade.php
  22.  
  23.  <html>
  24. <head>
  25.   @livewireStyles
  26. </head>
  27.  
  28. <body>
  29.   @livewire('add-post')
  30.  
  31.   @livewireScripts
  32. </body>
  33. </html>`
  34. //end
  35. IN: resources->views->livewire:
  36.  
  37. add-post.blade.php
  38.  
  39.     <div>
  40.     Title: {{ $title }}
  41.     <br>
  42.     Content: {{ $content }}
  43. </div>
Add Comment
Please, Sign In to add comment