Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<?php
class HomeController extends BaseController {
/*
|--------------------------------------------------------------------------
| Default Home Controller
|--------------------------------------------------------------------------
|
| You may wish to use controllers instead of, or in addition to, Closure
| based routes. That's great! Here is an example controller method to
| get you started. To route to this controller, just add the route:
|
| Route::get('/', 'HomeController@showWelcome');
|
*/
public function home()
{
/*
$user = User::whereNull('crypt_pass')->get();
foreach ($user as $key => $one) {
$old = $one->password;
$new = Hash::make($old);
$one->crypt_pass=$new;
$one->update();
}*/
return View::make('home');
}
public function postSearch()
{
$what = Input::get('k');
$circolari = Circolari::where(function($query)
{
$what = Input::get('k');
$query ->where('numero','LIKE','%'. $what .'%')
->orWhere('data_edizione','LIKE','%'. $what .'%')
->orWhere('titolo','LIKE','%'. $what .'%');
})->get(); //->paginate(12);
$brokers = Broker::where(function($query)
{
$what = Input::get('k');
$query ->where('numero','LIKE','%'. $what .'%')
->orWhere('testo','LIKE','%'. $what .'%')
->orWhere('titolo','LIKE','%'. $what .'%');
})->get();
/*echo '<pre>';
print_r($brokers->first()->titolo);
echo '</pre>';*/
//return;
return View::make('cerca', ['k'=>$what])
->with('circolari',$circolari)
->with('brokers',$brokers);
}
}
|
Revision |
Author |
Commited |
Message |
1464
|
MOliva
|
Tue 13 Oct, 2020 11:16:56 +0000 |
|