/** * Run the database seeds. * * @return void */ public function run() { Eloquent::unguard(); App\Subject::create(array('subject_code' => 'ICST102', 'subject_desc' => 'Computer Programming')); App\Subject::create(array('subject_code' => 'ICST103', 'subject_desc' => 'Data Structures')); App\Subject::create(array('subject_code' => 'ICST100', 'subject_desc' => 'Intro To Computers')); }
<tr> <td class="tbl-header-main" colspan="5">Year Level : {{ $curriculum_detail->yearlevel }} Term : {{ $curriculum_detail->term }}</td> </tr> <tr> <td class="tbl-header">Code</td> <td class="tbl-header">Descriptive Title</td> <td class="tbl-header" colspan="2">Units</th> <td class="tbl-header">Action</th> </tr> <?php $cur_d = DB::table('tbl_curriculumdetail')->whereCurriculumAndYearlevelAndTerm($id, $curriculum_detail->yearlevel, $curriculum_detail->term)->get(); ?> @foreach($cur_d as $detail) <?php $subject = App\Subject::findOrFail($detail->subject); ?> @if( ! $subject instanceof ModelNotFoundException) <tr> <td>{{ $subject->code }}</td> <td>{{ $subject->descriptivetitle }}</td> <td colspan="2">{{ $subject->units }}</td> <td> <a class="a-table label label-danger" href="/delete_subject_cur/{{ $curriculum_detail->id }}" onclick="return confirm('Are you sure?')">Delete <span class="glyphicon glyphicon-trash"></span></a> </td> </tr> @endif @endforeach
<?php /* |-------------------------------------------------------------------------- | Model Factories |-------------------------------------------------------------------------- | | Here you may define all of your model factories. Model factories give | you a convenient way to create models for testing and seeding your | database. Just tell the factory how a default model should look. | */ $factory->define(App\User::class, function (Faker\Generator $faker) { return ['name' => $faker->name, 'email' => $faker->email, 'password' => bcrypt(str_random(10)), 'remember_token' => str_random(10)]; }); $factory->define(App\Pupil::class, function (Faker\Generator $faker) { $school = App\School::orderBy(DB::raw('RAND()'))->first(); return ['surname' => $faker->lastName, 'firstname' => $faker->firstName, 'schoolenrolment' => rand(2006, 2012), 'school_id' => $school->id, 'letter' => 'abcde'[rand(0, 4)], 'street' => $faker->streetName . ' ' . rand(1, 50), 'zipcode' => '0' . rand(1000, 9999), 'town' => $faker->city]; }); $factory->define(App\School::class, function (Faker\Generator $faker) { return ['name' => $faker->lastName . ' Gymnasium', 'street' => $faker->streetName . ' ' . rand(1, 50), 'zipcode' => '0' . rand(1000, 9999), 'town' => $faker->city]; }); $factory->define(App\Circle::class, function (Faker\Generator $faker) { $subject = App\Subject::orderBy(DB::raw('RAND()'))->first(); return ['year' => rand(2012, 2020), 'grade' => rand(4, 13), 'subject_id' => $subject->id]; }); $factory->define(App\Registration::class, function (Faker\Generator $faker) { $circle = App\Circle::orderBy(DB::raw('RAND()'))->first(); $pupil = App\Pupil::orderBy(DB::raw('RAND()'))->first(); return ['pupil_id' => $pupil->id, 'circle_id' => $circle->id]; });
<?php Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']); get('/', ['as' => '/', 'uses' => 'HomeController@index']); // Student Route Route::bind('student', function ($id) { return App\Student::whereId($id)->first(); }); Route::resource('student', 'StudentController'); # Defined routes get('examiner/{eid}', ['as' => 'stud_exam', 'uses' => 'StudentController@entranceExamForm']); post('submit_exam', ['as' => 'submit_exam', 'uses' => 'StudentController@submitExam']); // User Route Route::bind('user', function ($id) { return App\User::whereId($id)->first(); }); Route::resource('user', 'UserController'); // Subject Route Route::bind('subject', function ($id) { return App\Subject::whereId($id)->first(); }); Route::resource('subject', 'SubjectController'); // Exam Route Route::bind('exam', function ($id) { return App\Exam::whereId($id)->first(); }); Route::resource('exam', 'ExamController');
Route::get('user/index', 'InstituteController@getUserIndex'); Route::post('user/index', 'InstituteController@posuserinfo'); Route::get('user/details/{uid}', 'InstituteController@getUserInfo'); Route::get('user/details/edit/{uid}', 'InstituteController@getUserInfoedit'); Route::post('user/details/edit/{uid}', 'InstituteController@getUserInfoupdate'); Route::get('user/info/delete/{uid}', 'InstituteController@getuserinfodelete'); //Saif Student Mark & Resul Managements //mark management saif........ Route::get('mark/index', 'StudentResultMarkController@markIndex'); Route::get('mark/add', 'StudentResultMarkController@markadd'); Route::post('mark/add', 'StudentResultMarkController@postAddMark'); Route::post('mark/add/all', ['as' => 'postsubmark', 'uses' => 'StudentResultMarkController@postAddMarkall']); Route::get('api/dropdown/subject', function () { $user = Input::get('option'); //return $user; $items = App\Subject::where('institute_code', '=', Auth::user()->institute_id)->where('class_id', '=', $user)->lists('subject_name', 'subject_code'); return Response::make($items); }); Route::get('mark/view/{roll}/{cid}', 'StudentResultMarkController@getMarkViews'); //Accounts Invoice Add Edit Delete view Update Route::get('/admin/add/invoice', 'AccountsController@getInvoice'); Route::post('/admin/add/invoice', 'AccountsController@postInvoice'); Route::get('/admin/edit/invoice/{id}', 'AccountsController@editInvoice'); Route::post('/admin/edit/invoice/{id}', 'AccountsController@updateInvoice'); Route::get('/admin/invoice/delete/{id}', 'AccountsController@deleteInvoice'); Route::get('view/invoice/{id}', 'AccountsController@viewInvoice'); Route::get('print/invoice/{id}', 'AccountsController@printInvoice'); Route::get('admin/view/balance', 'AccountsController@viewBalance'); Route::get('admin/view/individual/balance/{name}', 'AccountsController@individualBalance'); Route::get('print/individual/report/{name}', 'AccountsController@individualReportPrint'); //Account Module For Expense saif