/** * Bootstrap the application services. * * @return void */ public function boot() { // always returns $user whether logged in or not, null if not view()->composer(['layouts._rightnav', 'layouts.loginForm', 'tracks.index', 'skills.create', 'level.index', 'tracks.editForm', 'levels.editForm', 'difficulties.editForm'], function ($view) { $view->with('user', Auth::check() ? Auth::user()->firstname : null); }); view()->composer(['questions._questionform', 'skills.newform', 'skills._rowform'], function ($view) { $view->with(['tracks' => Track::lists('track', 'id'), 'levels' => Level::lists('description', 'id'), 'difficulties' => Difficulty::lists('difficulty', 'id'), 'skills' => Skill::lists('short_description', 'id'), 'user' => Auth::user()]); }); }
/** * Display a list profile * * @param [int] $id * @return Response */ public function index(\Illuminate\Http\Request $request) { $positions = Position::all(); $employee = Auth::user()->employee()->get()->first(); $educations = Education::where('employee_id', '=', $employee->id)->get(); $employee->date_of_birth = $this->convert_datetimesql_to_datepicker($employee->date_of_birth); $nationalities = Nationality::all(); $skill = array("-1" => "None") + Skill::lists('skill', 'id'); $employee_skills = EmployeeSkill::where('employee_id', '=', $employee->id)->get(); $experiences = WorkingExperience::where('employee_id', '=', $employee->id)->get(); foreach ($experiences as $key => $value) { $experiences[$key]->year_start = $this->convert_datetimesql_to_datepicker($value->year_start); $experiences[$key]->year_end = $this->convert_datetimesql_to_datepicker($value->year_end); } $flagMessage = $request->session()->get('flagMessage', 'false'); $taken_projects = TakenProject::where('employee_id', '=', $employee->id)->get(); return View('profiles.profiles', compact('positions', 'employee', 'experiences', 'nationalities', 'educations', 'employee_skills', 'skill', 'taken_projects', 'flagMessage')); }
/** * Receive get request from editmore.blade.php * @param [int] $id * @return [Illuminate\Contracts\View] */ public function editmore($id, \Illuminate\Http\Request $request) { $positions = Position::all(); $employee = Employee::find($id); $educations = Education::where('employee_id', '=', $employee->id)->get(); $employee->date_of_birth = $this->convert_datetimesql_to_datepicker($employee->date_of_birth); $nationalities = Nationality::all(); /*VIEW INFORMATION WORKING EXPERIENCE - VU*/ $skill = array("-1" => "None") + Skill::lists('skill', 'id'); $employee_skills = EmployeeSkill::where('employee_id', '=', $employee->id)->get(); //dd(json_encode($employee_skills)); $experiences = WorkingExperience::where('employee_id', '=', $employee->id)->get(); foreach ($experiences as $key => $value) { $experiences[$key]->year_start = $this->convert_datetimesql_to_datepicker($value->year_start); $experiences[$key]->year_end = $this->convert_datetimesql_to_datepicker($value->year_end); } /*VIEW INFORMATION TAKEN PROJECT - VU*/ $taken_projects = TakenProject::where('employee_id', '=', $employee->id)->get(); $flagMessage = $request->session()->get('flagMessage', 'false'); return View('employee.editmore', compact('positions', 'employee', 'experiences', 'nationalities', 'educations', 'employee_skills', 'skill', 'taken_projects', 'flagMessage')); }
public function run() { // non-NSCC $python1 = Course::create(['code' => 'PYTHON I', 'name' => 'Intro to Interactive Programming in Python', 'alias' => 'python1', 'importance' => 3, 'grade' => 97.2, 'completion_date' => '2013-11-19', 'topic_list' => 'Python Language, CokeSkulptor site, Objects, GUI Libraries, Game Mechanics', 'description' => "This is an online course from Rice University offered by Coursera.org. The course teaches Python from scratch in an online editor you can find at CodeSkulptor.org."]); $python2 = Course::create(['code' => 'PYTHON II', 'name' => 'Principles of Computing (in Python)', 'alias' => 'python2', 'importance' => 6, 'grade' => 100.0, 'completion_date' => '2014-04-19', 'topic_list' => 'Python Language, Game Algorithms, MiniMax method, Breadth vs Depth First Search', 'description' => "A second online course in Python from Rice University, via Coursera.org. This course got deeper into some heavy computing, creating AI game opponents that search game trees, etc."]); $bachelors = Course::create(['code' => 'BSc Mathematics', 'name' => 'Bachelors Degree from University of Saskatchewan', 'alias' => 'bachelors', 'importance' => 3, 'completion_date' => '2000-04-30', 'topic_list' => 'Advanced Linear Algebra, Multivariate Calculus, Statistics Survey, Galois Theory, Mathematical Induction', 'description' => "I have a 4 year Bachelors Degree from the University of Saskatchewan, majoring in Mathematics. This education gave me my foundation in general numeracy and logic that I find so helpful in day-to-day software development, and layed the groundwork for my subsequent Masters Degree."]); $masters = Course::create(['code' => 'MPMath', 'name' => 'Masters Degree - Pure Math Dept at University of Waterloo', 'alias' => 'masters', 'importance' => 8, 'completion_date' => '2003-04-30', 'topic_list' => 'Mathematical Logic, Combinatorics and Large Number Factoring, Algorithm Analysis, Graph Theory, Axiomatization Normalization and Decidability', 'description' => "My two year Masters was at the Pure Mathematics dept of Canada's best Math school the University of Waterloo. During my degree I touched on some topics of direct interest in Computer Science, such as Cryptography and large data-set analysis. However, my work focussed on very abstract logical structures, which gives me facility (and even affection) for algorithmic techniques like Recursion, Weighted Randomization, Asymptotic or Linear Approach, Parametrization, etc. Though I chose to leave academic mathematics after this degree, I finished it with Distinction, and I'm able to use skills learned there as a resource."]); // year 1, term 1: $web = Course::create(['code' => 'WEBD 1000', 'name' => 'Website Development', 'alias' => 'web', 'importance' => 0, 'grade' => 98.0, 'completion_date' => '2014-12-19', 'topic_list' => 'XML, HTML 5, CSS 3, Web Layout Best Practices, Javascript Snippets', 'description' => "This was my introductory web-coding course, where we learned to write Static Web Sites in HTML and CSS. We investigated some frameworks, but primarily created projects for this class from scratch."]); $network = Course::create(['code' => 'NETW 1100', 'name' => 'Introduction to Networking', 'alias' => 'network', 'importance' => 0, 'grade' => 100.0, 'completion_date' => '2014-12-19', 'topic_list' => 'OSI Model, TCP/IP, IPv4 and IPv6, Network Architecture', 'description' => "This course provided a solid introduction to Networking concepts, and rough familiarity with the common protocols in common use."]); $dbIntro = Course::create(['code' => 'DBAS 1001', 'name' => 'Introduction to Databases', 'alias' => 'dbIntro', 'importance' => 0, 'grade' => 99.0, 'completion_date' => '2014-12-19', 'topic_list' => 'Relational Databases, Toad Data Modeler, MS Access, Database Design', 'description' => "In this Introductory Database course, I learned the fundamentals of relational databases and database design. The course included use of VMWare, Toad Data Modeler, and MS Access."]); // year 1, term 2: $design = Course::create(['code' => 'APPD 1001', 'name' => 'User Interface Design', 'alias' => 'design', 'importance' => 0, 'grade' => 99.0, 'completion_date' => '2015-04-30', 'topic_list' => 'UI Best Practices, Mobile UI, Navigation Hierarchies, Adobe Products, Interface Testing', 'description' => "In this course I learned to design interfaces for functional as well as visual appeal. We investigated functional layout of existing applications and looked at alternatives that may be preferred by users."]); $db = Course::create(['code' => 'DBAS 1100', 'name' => 'Database Development', 'alias' => 'db', 'importance' => 5, 'grade' => 100.0, 'completion_date' => '2015-04-30', 'topic_list' => 'Scripting and Querying, Entity Relationships, SQL functions, Inner/Outer Joins, Scalable Design', 'description' => "In this course I learned how to design an Efficient, Scalable database. We learned to query easy-to-read information from across multiple tables using Joins and SQL functions."]); $linux = Course::create(['code' => 'OSYS 1000', 'name' => 'Operating Systems: Unix/Linux', 'alias' => 'linux', 'importance' => 2, 'grade' => 100.0, 'completion_date' => '2015-04-30', 'topic_list' => 'Installation Hierarchy, Shell Commands, Package Management, Scripting, VI/VIM Editor, Virtualization, Linux Networking', 'description' => "This course introduced me the linux family of operating systems. I learned 'day-to-day' use and some scripting to handle large file structures. I also became familiar with the VIM text editor, and a small amount of Perl scripting."]); $oopIntro = Course::create(['code' => 'PROG 1400', 'name' => 'Intro to Object Oriented Programming', 'alias' => 'oopIntro', 'importance' => 0, 'grade' => 99.0, 'completion_date' => '2015-04-30', 'topic_list' => 'Object Inheritance, Abstraction, Polymorphism, Overrides and Implementation, Java Swing Applications', 'description' => "In this course we used Eclipse to create Java Swing applications making use of Object Oriented Programming. Two notable projects were a screensaver implementing collision detection and smooth motion, and a combat simulation game with objects representing combatants and weapons of various sorts."]); $saad = Course::create(['code' => 'SAAD 1001', 'name' => 'System Analysis and Design', 'alias' => 'saad', 'importance' => 2, 'grade' => 97.0, 'completion_date' => '2015-04-30', 'topic_list' => 'Unified Modeling Language, Software Development Lifecycle, Use Cases, Test Cases, Sequence Diagrams, Class Diagrams', 'description' => "In this course I learned the Unified Modeling Language suite of documents, including testing docs, use cases, and class and sequence diagrams. Agile methodologies and scrum were touched on."]); // year 2, term 1: $android = Course::create(['code' => 'APPD 2000', 'name' => 'Android Application Development', 'alias' => 'android', 'importance' => 4, 'grade' => 97.0, 'completion_date' => '2015-12-18', 'topic_list' => 'Mobile Interface Design, Activities and Intents, Data Persistence, SQLite, SDK Considerations', 'description' => "I learned to create simple Android Apps using the Android Studio IDE. Coding in Java, we covered the Activity Lifecycle, Intents, Library Widgets, and Fragments. Several working Apps were created, runnable both on device emulators and various physical devices."]); $php = Course::create(['code' => 'INET 2005', 'name' => 'Web Application Development', 'alias' => 'php', 'importance' => 7, 'grade' => 100.0, 'completion_date' => '2015-12-18', 'topic_list' => 'Php language, Php Frameworks (Laravel), Restful Architecture, Secure Login, MVC Architecture, N-tier Architecture, Ajax', 'description' => "I learned all the necessary pieces to create working Php Web Applications either from scratch or using a framework. CRUD apps were a focus, and the final project was the creation of a full Content Management System with administrative Web-interface for backend work."]); $management = Course::create(['code' => 'INFT 2100', 'name' => 'Project Management', 'alias' => 'management', 'importance' => 3, 'grade' => 100.0, 'completion_date' => '2015-12-18', 'topic_list' => 'Agile Workflows, Scrum, Version Control, UML Documentation, Risk Management, Estimation, MS Project', 'description' => "In Project Management I learned common practices and workflows for working on larger project in Information Technology. The course included research and applying learned techniques to school projects."]); $cplus = Course::create(['code' => 'PROG 2100', 'name' => 'Programming C++', 'alias' => 'cplus', 'importance' => 6, 'grade' => 99.0, 'completion_date' => '2015-12-18', 'topic_list' => 'C++ Language, Memory Management, Efficient Computation, Minimax Algorithm', 'description' => "In the C++ course I learned the principles of Memory Management, how to apply Destructors/Copy Constructors/Assignment Overrides to catch Memory Leaks, and how to use poiters to cut down on unnecessary duplication of objects. The assignments included some Algorithm design, and the Minimax Strategy for turn based games."]); $j2ee = Course::create(['code' => 'WEBD 3102', 'name' => 'J2EE: Java Web Applications', 'alias' => 'j2ee', 'importance' => 5, 'grade' => 100.0, 'completion_date' => '2015-12-18', 'topic_list' => 'Apache Servers, Eclipse Mars, Servlets and Filters, .jsp Files, Tag Libraries, Concurrency', 'description' => "In this course, I learned the building blocks of a Java Web Application, and how to apply them to an Apache server from the Eclipse Mars IDE. Topics included backend Java Models, Servlet Controllers, Filters, .jsp Views, and Session vs Request Lifecycle."]); //////////////////////////////////// // Associate skills with each course //////////////////////////////////// $skills = Skill::lists('id', 'alias'); $python1->skills()->attach([$skills['python'], $skills['math'], $skills['algorithm']]); $python2->skills()->attach([$skills['python'], $skills['math'], $skills['algorithm']]); $android->skills()->attach([$skills['java'], $skills['android'], $skills['sqlite'], $skills['ui']]); $php->skills()->attach([$skills['php'], $skills['laravel'], $skills['js'], $skills['database'], $skills['git'], $skills['mvc'], $skills['phpstorm'], $skills['bash'], $skills['ajax']]); $management->skills()->attach([$skills['agile'], $skills['scrum'], $skills['uml'], $skills['office'], $skills['comm'], $skills['elearn']]); $cplus->skills()->attach([$skills['cplus'], $skills['vstudio'], $skills['algorithm'], $skills['oop'], $skills['uml'], $skills['elearn']]); $j2ee->skills()->attach([$skills['j2ee'], $skills['java'], $skills['eclipse'], $skills['mvc'], $skills['elearn']]); $design->skills()->attach([$skills['ui'], $skills['comm'], $skills['css']]); $db->skills()->attach([$skills['database'], $skills['sql'], $skills['mysql'], $skills['vmware']]); $linux->skills()->attach([$skills['bash'], $skills['vim'], $skills['putty']]); $oopIntro->skills()->attach([$skills['oop'], $skills['java'], $skills['eclipse'], $skills['algorithm'], $skills['math']]); $saad->skills()->attach([$skills['uml'], $skills['office'], $skills['agile'], $skills['scrum'], $skills['algorithm']]); $web->skills()->attach([$skills['html'], $skills['css'], $skills['js']]); $network->skills()->attach([$skills['elearn'], $skills['math'], $skills['algorithm']]); $dbIntro->skills()->attach([$skills['office'], $skills['algorithm'], $skills['vmware']]); $bachelors->skills()->attach([$skills['math'], $skills['algorithm'], $skills['comm']]); $masters->skills()->attach([$skills['math'], $skills['algorithm'], $skills['comm']]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(Employee $employee, Empskill $skill) { $skills = ['0' => 'Select'] + Skill::lists('name', 'id')->toArray(); return view('backend.employees.skill.edit', compact('employee', 'skill', 'skills')); }