D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
test
/
app
/
Http
/
Controllers
/
Filename :
ServiceController.php
back
Copy
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Artist; class ServiceController extends Controller { public function getIndex() { if (isset($_GET['artist_id_more'])) { $artist_id = (int)$_GET['artist_id_more']; $artist = Artist::find($artist_id); }elseif(isset($_GET['artist_name'])){ $name = $_GET['artist_name']; $artist = Artist::where('name', $name)->first(); }else{ $artist = new Artist; } $artist_id = $artist->id; setcookie("artist_id", $artist_id, time() + 3600, '/'); setcookie("saloon_id", (int)$artist->saloon_id, time() + 3600, '/'); return redirect('?calc=true'); } }