fadlyshafa

Untitled

Oct 22nd, 2020
1,001
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ....
  2. public function generate(Request $request){
  3.         $url = $request->url;
  4.  
  5.         $data = new Links;
  6.         $data->kode = rand();
  7.         $data->href = $url;
  8.         $data->save();
  9.  
  10.         $new_url = url('/').'/'.$data->kode;
  11.  
  12.         \Session::flash('url',$new_url);
  13.  
  14.         return redirect()->back();
  15.     }
  16. ....
RAW Paste Data