Beispiel #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $all_emp = App\Employee::all();
     $dev_number = App\Device::all()->count();
     $dev_list = range(1, $dev_number);
     $emp_list = range(1, $all_emp->count());
     for ($i = 0; $i < 200; $i++) {
         $log = factory(App\Log::class)->make();
         $log->emp_id = $emp_list[array_rand($emp_list)];
         $log->device_id = App\Employee::find($log->emp_id)->devices()->first()->pivot->device_id;
         $log->save();
     }
 }
Beispiel #2
0
     return App\Empwork::whereId($value)->first();
 });
 Route::bind('skills', function ($value, $route) {
     return App\Empskill::whereId($value)->first();
 });
 Route::bind('certification', function ($value, $route) {
     return App\Empcert::whereId($value)->first();
 });
 Route::bind('languages', function ($value, $route) {
     return App\Emplang::whereId($value)->first();
 });
 Route::bind('contracts', function ($value, $route) {
     return App\Empcontract::whereId($value)->first();
 });
 Route::bind('list', function ($value, $route) {
     return App\Employee::whereId($value)->first();
 });
 //Populate Dropdown
 Route::get('listkab', ['as' => 'admin.employee.listkab', 'uses' => 'EmployeeController@listkab']);
 Route::get('listkec', ['as' => 'admin.employee.listkec', 'uses' => 'EmployeeController@listkec']);
 Route::get('listkel', ['as' => 'admin.employee.listkel', 'uses' => 'EmployeeController@listkel']);
 //Show Employee Details
 Route::get('list/cdetails/{id}', ['as' => 'admin.employee.list.cdetails', 'uses' => 'EmployeeController@cdetails']);
 Route::get('list/job/{id}', ['as' => 'admin.employee.list.job', 'uses' => 'EmployeeController@job']);
 //Destroy
 Route::get('list/{id}/destroy', ['as' => 'admin.employee.list.delete', 'uses' => 'EmployeeController@destroy']);
 Route::get('list/{list}/econtacts/{econtacts}/destroy', ['as' => 'admin.employee.list.econtacts.delete', 'uses' => 'EmpemergencyController@destroy']);
 Route::get('list/{list}/dependents/{dependents}/destroy', ['as' => 'admin.employee.list.dependents.delete', 'uses' => 'EmpdependentController@destroy']);
 Route::get('list/{list}/salary/{salary}/destroy', ['as' => 'admin.employee.list.salary.delete', 'uses' => 'EmpsalaryController@destroy']);
 Route::get('list/{list}/qualification/{qualification}/destroy', ['as' => 'admin.employee.list.qualification.delete', 'uses' => 'EmpqualificationController@destroy']);
 Route::get('list/{list}/experience/{experience}/destroy', ['as' => 'admin.employee.list.experience.delete', 'uses' => 'EmpworkController@destroy']);
Beispiel #3
0
<?php

/*
|--------------------------------------------------------------------------
| 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.
|
*/
//API ROUTES
Route::group(['prefix' => 'api'], function () {
    Route::get('get-all-user', function () {
        return App\Employee::all()->toJson();
    });
});
//END API ROUTES
Route::get('/', function () {
    return view('welcome');
});
Route::resource('Employee', 'EmployeeController');
Beispiel #4
0
| 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('/', 'WelcomeController@index');
Route::get('dashboard', 'PagesController@dashboard');
Route::get('login', 'PagesController@login');
Route::get('home', function () {
    if (Auth::guest()) {
        return Redirect::to('login');
    } else {
        return view('pages.dashboard')->with('users', App\User::all())->with('task_categories', App\TaskCategory::all())->with('tasks', App\Task::all())->with('companies', App\Company::all())->with('contracts', App\Contract::all())->with('solutions', App\Solution::all())->with('clients', App\Client::all())->with('employees', App\Employee::all());
    }
});
// model routes..
Route::post('tc/store', 'TaskCategoryController@store');
Route::post('tc/edit/{id}', array('uses' => 'TaskCategoryController@edit', 'as' => 'route.edit'));
Route::patch('tc/{id}', array('uses' => 'TaskCategoryController@update', 'as' => 'route.update'));
Route::delete('tc/{id}', array('uses' => 'TaskCategoryController@destroy', 'as' => 'route.destroy'));
Route::post('task/store', 'TaskController@store');
Route::post('task/edit/{id}', array('uses' => 'TaskController@edit', 'as' => 'task.edit'));
Route::post('task/approve/{id}', array('uses' => 'TaskController@approve', 'as' => 'task.approve'));
Route::patch('task/{id}', array('uses' => 'TaskController@update', 'as' => 'task.update'));
Route::delete('task/{id}', array('uses' => 'TaskController@destroy', 'as' => 'task.destroy'));
Route::post('client/store', 'ClientController@store');
Route::post('client/edit/{id}', array('uses' => 'ClientController@edit', 'as' => 'client.edit'));
Route::patch('client/{id}', array('uses' => 'ClientController@update', 'as' => 'client.update'));
Beispiel #5
0
 Route::get('password/email', 'Auth\\PasswordController@getEmail');
 Route::post('password/email', 'Auth\\PasswordController@postEmail');
 // Password reset routes...
 Route::get('password/reset/{token}', 'Auth\\PasswordController@getReset');
 Route::post('password/reset', 'Auth\\PasswordController@postReset');
 // Store Web Inquiries
 Route::post('inquiries/web', ['as' => 'inquiry.storeweb', 'uses' => 'InquiryController@storeWeb']);
 /*
     |------------------------------------
     | Login Required Routes 
     |------------------------------------
 */
 Route::group(['middleware' => 'auth'], function () {
     Route::get('/', function () {
         //return "Hello World";
         $employee_count = App\Employee::all()->count('id');
         $student_count = App\Student::all()->count('id');
         $buyer_count = App\Buyer::all()->count('id');
         $seller_count = App\Seller::all()->count('id');
         $charter_guest_count = App\CharterGuest::all()->count('id');
         return view('index', ['title' => 'Dashboard', 'employee_count' => $employee_count, 'student_count' => $student_count, 'buyer_count' => $buyer_count, 'seller_count' => $seller_count, 'charter_guest_count' => $charter_guest_count]);
     });
     //Inquiry Routes
     Route::get('/inquiries', ['as' => 'inquiries', 'uses' => 'InquiryController@index']);
     Route::get('/inquiries/create', ['as' => 'inquiry.create', 'uses' => 'InquiryController@create']);
     Route::post('inquiries/create', ['as' => 'inquiry.store', 'uses' => 'InquiryController@store']);
     Route::get('/inquiries/{$id}', ['as' => 'inquiry.show', 'uses' => 'InquiryController@show']);
     //Admin Routes
     Route::get('test_schedules/{template}', 'ResponseScheduleController@create');
     Route::get('admin/response_schedules', ['as' => 'admin.respsone_schedules', 'uses' => 'ResponseScheduleController@index']);
     Route::get('admin/response_schedules/{schedule}/send', ['as' => 'admin.respsone_schedules.send', 'uses' => 'ResponseScheduleController@send']);