コード例 #1
0
ファイル: routes.php プロジェクト: leanne-abarro/tagAndTrack
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
});
// ===== auto complete routes =====
Route::get('toolnames', function () {
    $toolnames = collect(\App\Models\Tool::lists("name"));
    return $toolnames->unique()->values()->all();
});
Route::get('technames', function () {
    $technames = collect(\App\Models\Technician::lists("tech_name"));
    return $technames->unique()->values()->all();
});
Route::get('techcompanies', function () {
    $techcompanies = collect(\App\Models\Technician::lists("tech_company"));
    return $techcompanies->unique()->values()->all();
});
Route::get('technumbers', function () {
    $technumbers = collect(\App\Models\Technician::lists("contact_number"));
    return $technumbers->unique()->values()->all();
});
// ===== donut charts routes =====