Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function RandomCats($value) {
- $N = $value;
- $f_contents = file("cats.txt");
- $line1 = $f_contents[array_rand($f_contents)];
- $line2 = $f_contents[array_rand($f_contents)];
- $line3 = $f_contents[array_rand($f_contents)];
- $Cat1 = $line1;
- $Cat2 = $line2;
- $Cat3 = $line3;
- if ($value < 1000000 && $value > 0) {
- return view('randomcats', compact('Cat1', 'Cat2', 'Cat3', 'N'));
- } else {
- return redirect('/');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement