Guest User

Untitled

a guest
May 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. $hashids = new Hashids('SEKALISAHAJAGENERATESALT', 8, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
  4.  
  5. $host = Host::create([
  6.  
  7. 'name' => request('name'),
  8. 'description' => request('description')
  9.  
  10. ]);
  11.  
  12. $host->update([
  13. 'host_id' => $hashids->encode($host->id);
  14. ]);
  15.  
  16. return back();
Add Comment
Please, Sign In to add comment