Repository: Mazbaul/Online-Learning-And-Course-Management-System
Branch: master
Commit: f8be196b4adc
Files: 968
Total size: 10.9 MB
Directory structure:
gitextract_dnmsdmly/
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ └── workflows/
│ └── phpmd.yml
├── .gitignore
├── LICENSE
├── README.md
├── app/
│ ├── Console/
│ │ └── Kernel.php
│ ├── Course.php
│ ├── Exceptions/
│ │ └── Handler.php
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── Admin/
│ │ │ │ ├── CoursesController.php
│ │ │ │ ├── DashboardController.php
│ │ │ │ ├── LessonsController.php
│ │ │ │ ├── PermissionsController.php
│ │ │ │ ├── QuestionsController.php
│ │ │ │ ├── QuestionsOptionsController.php
│ │ │ │ ├── RolesController.php
│ │ │ │ ├── SpatieMediaController.php
│ │ │ │ ├── TestsController.php
│ │ │ │ └── UsersController.php
│ │ │ ├── Auth/
│ │ │ │ ├── ChangePasswordController.php
│ │ │ │ ├── ForgotPasswordController.php
│ │ │ │ ├── LoginController.php
│ │ │ │ ├── RegisterController.php
│ │ │ │ └── ResetPasswordController.php
│ │ │ ├── Controller.php
│ │ │ ├── CoursesController.php
│ │ │ ├── HomeController.php
│ │ │ ├── LessonsController.php
│ │ │ └── Traits/
│ │ │ └── FileUploadTrait.php
│ │ ├── Kernel.php
│ │ ├── Middleware/
│ │ │ ├── AdminMiddleware.php
│ │ │ ├── EncryptCookies.php
│ │ │ ├── RedirectIfAuthenticated.php
│ │ │ ├── TrimStrings.php
│ │ │ └── VerifyCsrfToken.php
│ │ └── Requests/
│ │ └── Admin/
│ │ ├── StoreCoursesRequest.php
│ │ ├── StoreLessonsRequest.php
│ │ ├── StorePermissionsRequest.php
│ │ ├── StoreQuestionsOptionsRequest.php
│ │ ├── StoreQuestionsRequest.php
│ │ ├── StoreRolesRequest.php
│ │ ├── StoreTestsRequest.php
│ │ ├── StoreUsersRequest.php
│ │ ├── UpdateCoursesRequest.php
│ │ ├── UpdateLessonsRequest.php
│ │ ├── UpdatePermissionsRequest.php
│ │ ├── UpdateQuestionsOptionsRequest.php
│ │ ├── UpdateQuestionsRequest.php
│ │ ├── UpdateRolesRequest.php
│ │ ├── UpdateTestsRequest.php
│ │ └── UpdateUsersRequest.php
│ ├── Lesson.php
│ ├── Permission.php
│ ├── Providers/
│ │ ├── AppServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ ├── BroadcastServiceProvider.php
│ │ ├── EventServiceProvider.php
│ │ └── RouteServiceProvider.php
│ ├── Question.php
│ ├── QuestionsOption.php
│ ├── Role.php
│ ├── Test.php
│ ├── TestsResult.php
│ ├── TestsResultsAnswer.php
│ └── User.php
├── artisan
├── bootstrap/
│ ├── app.php
│ ├── autoload.php
│ └── cache/
│ └── .gitignore
├── composer.json
├── config/
│ ├── app.php
│ ├── auth.php
│ ├── broadcasting.php
│ ├── cache.php
│ ├── database.php
│ ├── filesystems.php
│ ├── laravel-medialibrary.php
│ ├── mail.php
│ ├── queue.php
│ ├── services.php
│ ├── session.php
│ └── view.php
├── database/
│ ├── .gitignore
│ ├── factories/
│ │ ├── CourseFactory.php
│ │ ├── LessonFactory.php
│ │ ├── ModelFactory.php
│ │ ├── QuestionFactory.php
│ │ ├── QuestionsOptionFactory.php
│ │ └── TestFactory.php
│ ├── migrations/
│ │ ├── 2014_10_12_100000_create_password_resets_table.php
│ │ ├── 2017_07_19_082005_create_1500441605_permissions_table.php
│ │ ├── 2017_07_19_082006_create_1500441606_roles_table.php
│ │ ├── 2017_07_19_082009_create_1500441609_users_table.php
│ │ ├── 2017_07_19_082347_create_1500441827_courses_table.php
│ │ ├── 2017_07_19_082723_create_1500442043_lessons_table.php
│ │ ├── 2017_07_19_082724_create_media_table.php
│ │ ├── 2017_07_19_082929_create_1500442169_questions_table.php
│ │ ├── 2017_07_19_083047_create_1500442247_questions_options_table.php
│ │ ├── 2017_07_19_083236_create_1500442356_tests_table.php
│ │ ├── 2017_07_19_120427_create_596eec08307cd_permission_role_table.php
│ │ ├── 2017_07_19_120430_create_596eec0af366b_role_user_table.php
│ │ ├── 2017_07_19_120808_create_596eece522a6e_course_user_table.php
│ │ ├── 2017_07_19_121657_create_596eeef709839_question_test_table.php
│ │ ├── 2017_08_14_085956_create_course_students_table.php
│ │ ├── 2017_08_17_051131_create_tests_results_table.php
│ │ ├── 2017_08_17_051254_create_tests_results_answers_table.php
│ │ ├── 2017_08_18_054622_create_lesson_student_table.php
│ │ ├── 2017_08_18_060324_add_rating_to_course_student_table.php
│ │ └── combined/
│ │ ├── 2017_07_19_082005_create_combined_1500441605_permissions_table.php
│ │ ├── 2017_07_19_082006_create_combined_1500441606_roles_table.php
│ │ ├── 2017_07_19_082009_create_combined_1500441609_users_table.php
│ │ ├── 2017_07_19_082347_create_combined_1500441827_courses_table.php
│ │ ├── 2017_07_19_082723_create_combined_1500442043_lessons_table.php
│ │ ├── 2017_07_19_082929_create_combined_1500442169_questions_table.php
│ │ ├── 2017_07_19_083047_create_combined_1500442247_questions_options_table.php
│ │ ├── 2017_07_19_083236_create_combined_1500442356_tests_table.php
│ │ ├── 2017_07_19_120428_create_combined_596eec08307cd_permission_role_table.php
│ │ ├── 2017_07_19_120431_create_combined_596eec0af366b_role_user_table.php
│ │ ├── 2017_07_19_120809_create_combined_596eece522a6e_course_user_table.php
│ │ └── 2017_07_19_121658_create_combined_596eeef709839_question_test_table.php
│ └── seeds/
│ ├── CourseSeed.php
│ ├── DatabaseSeeder.php
│ ├── PermissionSeed.php
│ ├── QuestionsSeed.php
│ ├── RoleSeed.php
│ ├── RoleSeedPivot.php
│ ├── UserSeed.php
│ └── UserSeedPivot.php
├── package.json
├── phpunit.xml
├── public/
│ ├── .htaccess
│ ├── adminlte/
│ │ ├── bootstrap/
│ │ │ ├── css/
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap.css
│ │ │ └── js/
│ │ │ ├── bootstrap.js
│ │ │ └── npm.js
│ │ ├── css/
│ │ │ ├── AdminLTE.css
│ │ │ ├── alt/
│ │ │ │ ├── AdminLTE-bootstrap-social.css
│ │ │ │ ├── AdminLTE-fullcalendar.css
│ │ │ │ ├── AdminLTE-select2.css
│ │ │ │ └── AdminLTE-without-plugins.css
│ │ │ └── skins/
│ │ │ ├── _all-skins.css
│ │ │ ├── skin-black-light.css
│ │ │ ├── skin-black.css
│ │ │ ├── skin-blue-light.css
│ │ │ ├── skin-blue.css
│ │ │ ├── skin-green-light.css
│ │ │ ├── skin-green.css
│ │ │ ├── skin-purple-light.css
│ │ │ ├── skin-purple.css
│ │ │ ├── skin-red-light.css
│ │ │ ├── skin-red.css
│ │ │ ├── skin-yellow-light.css
│ │ │ └── skin-yellow.css
│ │ ├── js/
│ │ │ ├── app.js
│ │ │ ├── demo.js
│ │ │ ├── main.js
│ │ │ ├── pages/
│ │ │ │ ├── dashboard.js
│ │ │ │ └── dashboard2.js
│ │ │ ├── textext.core.js
│ │ │ ├── textext.plugin.tags.js
│ │ │ ├── timepicker.js
│ │ │ └── vue.js
│ │ └── plugins/
│ │ ├── bootstrap-slider/
│ │ │ ├── bootstrap-slider.js
│ │ │ └── slider.css
│ │ ├── bootstrap-wysihtml5/
│ │ │ ├── bootstrap3-wysihtml5.all.js
│ │ │ └── bootstrap3-wysihtml5.css
│ │ ├── chartjs/
│ │ │ └── Chart.js
│ │ ├── ckeditor/
│ │ │ ├── CHANGES.md
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ ├── adapters/
│ │ │ │ └── jquery.js
│ │ │ ├── build-config.js
│ │ │ ├── ckeditor.js
│ │ │ ├── config.js
│ │ │ ├── contents.css
│ │ │ ├── lang/
│ │ │ │ ├── af.js
│ │ │ │ ├── ar.js
│ │ │ │ ├── bg.js
│ │ │ │ ├── bn.js
│ │ │ │ ├── bs.js
│ │ │ │ ├── ca.js
│ │ │ │ ├── cs.js
│ │ │ │ ├── cy.js
│ │ │ │ ├── da.js
│ │ │ │ ├── de-ch.js
│ │ │ │ ├── de.js
│ │ │ │ ├── el.js
│ │ │ │ ├── en-au.js
│ │ │ │ ├── en-ca.js
│ │ │ │ ├── en-gb.js
│ │ │ │ ├── en.js
│ │ │ │ ├── eo.js
│ │ │ │ ├── es.js
│ │ │ │ ├── et.js
│ │ │ │ ├── eu.js
│ │ │ │ ├── fa.js
│ │ │ │ ├── fi.js
│ │ │ │ ├── fo.js
│ │ │ │ ├── fr-ca.js
│ │ │ │ ├── fr.js
│ │ │ │ ├── gl.js
│ │ │ │ ├── gu.js
│ │ │ │ ├── he.js
│ │ │ │ ├── hi.js
│ │ │ │ ├── hr.js
│ │ │ │ ├── hu.js
│ │ │ │ ├── id.js
│ │ │ │ ├── is.js
│ │ │ │ ├── it.js
│ │ │ │ ├── ja.js
│ │ │ │ ├── ka.js
│ │ │ │ ├── km.js
│ │ │ │ ├── ko.js
│ │ │ │ ├── ku.js
│ │ │ │ ├── lt.js
│ │ │ │ ├── lv.js
│ │ │ │ ├── mk.js
│ │ │ │ ├── mn.js
│ │ │ │ ├── ms.js
│ │ │ │ ├── nb.js
│ │ │ │ ├── nl.js
│ │ │ │ ├── no.js
│ │ │ │ ├── pl.js
│ │ │ │ ├── pt-br.js
│ │ │ │ ├── pt.js
│ │ │ │ ├── ro.js
│ │ │ │ ├── ru.js
│ │ │ │ ├── si.js
│ │ │ │ ├── sk.js
│ │ │ │ ├── sl.js
│ │ │ │ ├── sq.js
│ │ │ │ ├── sr-latn.js
│ │ │ │ ├── sr.js
│ │ │ │ ├── sv.js
│ │ │ │ ├── th.js
│ │ │ │ ├── tr.js
│ │ │ │ ├── tt.js
│ │ │ │ ├── ug.js
│ │ │ │ ├── uk.js
│ │ │ │ ├── vi.js
│ │ │ │ ├── zh-cn.js
│ │ │ │ └── zh.js
│ │ │ ├── plugins/
│ │ │ │ ├── a11yhelp/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ ├── a11yhelp.js
│ │ │ │ │ └── lang/
│ │ │ │ │ ├── _translationstatus.txt
│ │ │ │ │ ├── af.js
│ │ │ │ │ ├── ar.js
│ │ │ │ │ ├── bg.js
│ │ │ │ │ ├── ca.js
│ │ │ │ │ ├── cs.js
│ │ │ │ │ ├── cy.js
│ │ │ │ │ ├── da.js
│ │ │ │ │ ├── de-ch.js
│ │ │ │ │ ├── de.js
│ │ │ │ │ ├── el.js
│ │ │ │ │ ├── en-gb.js
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── eo.js
│ │ │ │ │ ├── es.js
│ │ │ │ │ ├── et.js
│ │ │ │ │ ├── eu.js
│ │ │ │ │ ├── fa.js
│ │ │ │ │ ├── fi.js
│ │ │ │ │ ├── fo.js
│ │ │ │ │ ├── fr-ca.js
│ │ │ │ │ ├── fr.js
│ │ │ │ │ ├── gl.js
│ │ │ │ │ ├── gu.js
│ │ │ │ │ ├── he.js
│ │ │ │ │ ├── hi.js
│ │ │ │ │ ├── hr.js
│ │ │ │ │ ├── hu.js
│ │ │ │ │ ├── id.js
│ │ │ │ │ ├── it.js
│ │ │ │ │ ├── ja.js
│ │ │ │ │ ├── km.js
│ │ │ │ │ ├── ko.js
│ │ │ │ │ ├── ku.js
│ │ │ │ │ ├── lt.js
│ │ │ │ │ ├── lv.js
│ │ │ │ │ ├── mk.js
│ │ │ │ │ ├── mn.js
│ │ │ │ │ ├── nb.js
│ │ │ │ │ ├── nl.js
│ │ │ │ │ ├── no.js
│ │ │ │ │ ├── pl.js
│ │ │ │ │ ├── pt-br.js
│ │ │ │ │ ├── pt.js
│ │ │ │ │ ├── ro.js
│ │ │ │ │ ├── ru.js
│ │ │ │ │ ├── si.js
│ │ │ │ │ ├── sk.js
│ │ │ │ │ ├── sl.js
│ │ │ │ │ ├── sq.js
│ │ │ │ │ ├── sr-latn.js
│ │ │ │ │ ├── sr.js
│ │ │ │ │ ├── sv.js
│ │ │ │ │ ├── th.js
│ │ │ │ │ ├── tr.js
│ │ │ │ │ ├── tt.js
│ │ │ │ │ ├── ug.js
│ │ │ │ │ ├── uk.js
│ │ │ │ │ ├── vi.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh.js
│ │ │ │ ├── about/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ └── about.js
│ │ │ │ ├── clipboard/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ └── paste.js
│ │ │ │ ├── dialog/
│ │ │ │ │ └── dialogDefinition.js
│ │ │ │ ├── image/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ └── image.js
│ │ │ │ ├── link/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ ├── anchor.js
│ │ │ │ │ └── link.js
│ │ │ │ ├── pastefromword/
│ │ │ │ │ └── filter/
│ │ │ │ │ └── default.js
│ │ │ │ ├── scayt/
│ │ │ │ │ ├── LICENSE.md
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── dialogs/
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── toolbar.css
│ │ │ │ ├── specialchar/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ ├── lang/
│ │ │ │ │ │ ├── _translationstatus.txt
│ │ │ │ │ │ ├── af.js
│ │ │ │ │ │ ├── ar.js
│ │ │ │ │ │ ├── bg.js
│ │ │ │ │ │ ├── ca.js
│ │ │ │ │ │ ├── cs.js
│ │ │ │ │ │ ├── cy.js
│ │ │ │ │ │ ├── da.js
│ │ │ │ │ │ ├── de-ch.js
│ │ │ │ │ │ ├── de.js
│ │ │ │ │ │ ├── el.js
│ │ │ │ │ │ ├── en-gb.js
│ │ │ │ │ │ ├── en.js
│ │ │ │ │ │ ├── eo.js
│ │ │ │ │ │ ├── es.js
│ │ │ │ │ │ ├── et.js
│ │ │ │ │ │ ├── eu.js
│ │ │ │ │ │ ├── fa.js
│ │ │ │ │ │ ├── fi.js
│ │ │ │ │ │ ├── fr-ca.js
│ │ │ │ │ │ ├── fr.js
│ │ │ │ │ │ ├── gl.js
│ │ │ │ │ │ ├── he.js
│ │ │ │ │ │ ├── hr.js
│ │ │ │ │ │ ├── hu.js
│ │ │ │ │ │ ├── id.js
│ │ │ │ │ │ ├── it.js
│ │ │ │ │ │ ├── ja.js
│ │ │ │ │ │ ├── km.js
│ │ │ │ │ │ ├── ko.js
│ │ │ │ │ │ ├── ku.js
│ │ │ │ │ │ ├── lt.js
│ │ │ │ │ │ ├── lv.js
│ │ │ │ │ │ ├── nb.js
│ │ │ │ │ │ ├── nl.js
│ │ │ │ │ │ ├── no.js
│ │ │ │ │ │ ├── pl.js
│ │ │ │ │ │ ├── pt-br.js
│ │ │ │ │ │ ├── pt.js
│ │ │ │ │ │ ├── ru.js
│ │ │ │ │ │ ├── si.js
│ │ │ │ │ │ ├── sk.js
│ │ │ │ │ │ ├── sl.js
│ │ │ │ │ │ ├── sq.js
│ │ │ │ │ │ ├── sv.js
│ │ │ │ │ │ ├── th.js
│ │ │ │ │ │ ├── tr.js
│ │ │ │ │ │ ├── tt.js
│ │ │ │ │ │ ├── ug.js
│ │ │ │ │ │ ├── uk.js
│ │ │ │ │ │ ├── vi.js
│ │ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ │ └── zh.js
│ │ │ │ │ └── specialchar.js
│ │ │ │ ├── table/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ └── table.js
│ │ │ │ ├── tabletools/
│ │ │ │ │ └── dialogs/
│ │ │ │ │ └── tableCell.js
│ │ │ │ └── wsc/
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── README.md
│ │ │ │ └── dialogs/
│ │ │ │ ├── ciframe.html
│ │ │ │ ├── tmpFrameset.html
│ │ │ │ ├── wsc.css
│ │ │ │ ├── wsc.js
│ │ │ │ └── wsc_ie.js
│ │ │ ├── samples/
│ │ │ │ ├── css/
│ │ │ │ │ └── samples.css
│ │ │ │ ├── index.html
│ │ │ │ ├── js/
│ │ │ │ │ ├── sample.js
│ │ │ │ │ └── sf.js
│ │ │ │ ├── old/
│ │ │ │ │ ├── ajax.html
│ │ │ │ │ ├── api.html
│ │ │ │ │ ├── appendto.html
│ │ │ │ │ ├── assets/
│ │ │ │ │ │ ├── outputxhtml/
│ │ │ │ │ │ │ └── outputxhtml.css
│ │ │ │ │ │ ├── posteddata.php
│ │ │ │ │ │ └── uilanguages/
│ │ │ │ │ │ └── languages.js
│ │ │ │ │ ├── datafiltering.html
│ │ │ │ │ ├── dialog/
│ │ │ │ │ │ ├── assets/
│ │ │ │ │ │ │ └── my_dialog.js
│ │ │ │ │ │ └── dialog.html
│ │ │ │ │ ├── divreplace.html
│ │ │ │ │ ├── enterkey/
│ │ │ │ │ │ └── enterkey.html
│ │ │ │ │ ├── htmlwriter/
│ │ │ │ │ │ ├── assets/
│ │ │ │ │ │ │ └── outputforflash/
│ │ │ │ │ │ │ ├── outputforflash.fla
│ │ │ │ │ │ │ ├── outputforflash.swf
│ │ │ │ │ │ │ └── swfobject.js
│ │ │ │ │ │ ├── outputforflash.html
│ │ │ │ │ │ └── outputhtml.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── inlineall.html
│ │ │ │ │ ├── inlinebycode.html
│ │ │ │ │ ├── inlinetextarea.html
│ │ │ │ │ ├── jquery.html
│ │ │ │ │ ├── magicline/
│ │ │ │ │ │ └── magicline.html
│ │ │ │ │ ├── readonly.html
│ │ │ │ │ ├── replacebyclass.html
│ │ │ │ │ ├── replacebycode.html
│ │ │ │ │ ├── sample.css
│ │ │ │ │ ├── sample.js
│ │ │ │ │ ├── sample_posteddata.php
│ │ │ │ │ ├── tabindex.html
│ │ │ │ │ ├── toolbar/
│ │ │ │ │ │ └── toolbar.html
│ │ │ │ │ ├── uicolor.html
│ │ │ │ │ ├── uilanguages.html
│ │ │ │ │ ├── wysiwygarea/
│ │ │ │ │ │ └── fullpage.html
│ │ │ │ │ └── xhtmlstyle.html
│ │ │ │ └── toolbarconfigurator/
│ │ │ │ ├── css/
│ │ │ │ │ └── fontello.css
│ │ │ │ ├── font/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ └── config.json
│ │ │ │ ├── index.html
│ │ │ │ ├── js/
│ │ │ │ │ ├── abstracttoolbarmodifier.js
│ │ │ │ │ ├── fulltoolbareditor.js
│ │ │ │ │ ├── toolbarmodifier.js
│ │ │ │ │ └── toolbartextmodifier.js
│ │ │ │ └── lib/
│ │ │ │ └── codemirror/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── codemirror.css
│ │ │ │ ├── codemirror.js
│ │ │ │ ├── javascript.js
│ │ │ │ ├── neo.css
│ │ │ │ ├── show-hint.css
│ │ │ │ └── show-hint.js
│ │ │ ├── skins/
│ │ │ │ └── moono/
│ │ │ │ ├── dialog.css
│ │ │ │ ├── dialog_ie.css
│ │ │ │ ├── dialog_ie7.css
│ │ │ │ ├── dialog_ie8.css
│ │ │ │ ├── dialog_iequirks.css
│ │ │ │ ├── editor.css
│ │ │ │ ├── editor_gecko.css
│ │ │ │ ├── editor_ie.css
│ │ │ │ ├── editor_ie7.css
│ │ │ │ ├── editor_ie8.css
│ │ │ │ ├── editor_iequirks.css
│ │ │ │ └── readme.md
│ │ │ └── styles.js
│ │ ├── colorpicker/
│ │ │ ├── bootstrap-colorpicker.css
│ │ │ └── bootstrap-colorpicker.js
│ │ ├── datatables/
│ │ │ ├── dataTables.bootstrap.css
│ │ │ ├── dataTables.bootstrap.js
│ │ │ ├── extensions/
│ │ │ │ ├── AutoFill/
│ │ │ │ │ ├── Readme.txt
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.autoFill.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── columns.html
│ │ │ │ │ │ ├── complete-callback.html
│ │ │ │ │ │ ├── fill-both.html
│ │ │ │ │ │ ├── fill-horizontal.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── scrolling.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ └── step-callback.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.autoFill.js
│ │ │ │ ├── ColReorder/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.colReorder.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── alt_insert.html
│ │ │ │ │ │ ├── col_filter.html
│ │ │ │ │ │ ├── colvis.html
│ │ │ │ │ │ ├── fixedcolumns.html
│ │ │ │ │ │ ├── fixedheader.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jqueryui.html
│ │ │ │ │ │ ├── new_init.html
│ │ │ │ │ │ ├── predefined.html
│ │ │ │ │ │ ├── realtime.html
│ │ │ │ │ │ ├── reset.html
│ │ │ │ │ │ ├── scrolling.html
│ │ │ │ │ │ ├── server_side.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ └── state_save.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.colReorder.js
│ │ │ │ ├── ColVis/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ ├── dataTables.colVis.css
│ │ │ │ │ │ └── dataTables.colvis.jqueryui.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── button_order.html
│ │ │ │ │ │ ├── exclude_columns.html
│ │ │ │ │ │ ├── group_columns.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jqueryui.html
│ │ │ │ │ │ ├── mouseover.html
│ │ │ │ │ │ ├── new_init.html
│ │ │ │ │ │ ├── restore.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ ├── text.html
│ │ │ │ │ │ ├── title_callback.html
│ │ │ │ │ │ ├── two_tables.html
│ │ │ │ │ │ └── two_tables_identical.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.colVis.js
│ │ │ │ ├── FixedColumns/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.fixedColumns.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── bootstrap.html
│ │ │ │ │ │ ├── col_filter.html
│ │ │ │ │ │ ├── colvis.html
│ │ │ │ │ │ ├── css_size.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── index_column.html
│ │ │ │ │ │ ├── left_right_columns.html
│ │ │ │ │ │ ├── right_column.html
│ │ │ │ │ │ ├── rowspan.html
│ │ │ │ │ │ ├── server-side-processing.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ ├── size_fixed.html
│ │ │ │ │ │ ├── size_fluid.html
│ │ │ │ │ │ └── two_columns.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.fixedColumns.js
│ │ │ │ ├── FixedHeader/
│ │ │ │ │ ├── Readme.txt
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.fixedHeader.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── header_footer.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ ├── top_left_right.html
│ │ │ │ │ │ ├── two_tables.html
│ │ │ │ │ │ └── zIndexes.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.fixedHeader.js
│ │ │ │ ├── KeyTable/
│ │ │ │ │ ├── Readme.txt
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.keyTable.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── events.html
│ │ │ │ │ │ ├── html.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── scrolling.html
│ │ │ │ │ │ └── simple.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.keyTable.js
│ │ │ │ ├── Responsive/
│ │ │ │ │ ├── License.txt
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ ├── dataTables.responsive.css
│ │ │ │ │ │ └── dataTables.responsive.scss
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── child-rows/
│ │ │ │ │ │ │ ├── column-control.html
│ │ │ │ │ │ │ ├── custom-renderer.html
│ │ │ │ │ │ │ ├── disable-child-rows.html
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── right-column.html
│ │ │ │ │ │ │ └── whole-row-control.html
│ │ │ │ │ │ ├── display-control/
│ │ │ │ │ │ │ ├── auto.html
│ │ │ │ │ │ │ ├── classes.html
│ │ │ │ │ │ │ ├── complexHeader.html
│ │ │ │ │ │ │ ├── fixedHeader.html
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ └── init-classes.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── initialisation/
│ │ │ │ │ │ │ ├── ajax.html
│ │ │ │ │ │ │ ├── className.html
│ │ │ │ │ │ │ ├── default.html
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── new.html
│ │ │ │ │ │ │ └── option.html
│ │ │ │ │ │ └── styling/
│ │ │ │ │ │ ├── bootstrap.html
│ │ │ │ │ │ ├── compact.html
│ │ │ │ │ │ ├── foundation.html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── scrolling.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.responsive.js
│ │ │ │ ├── Scroller/
│ │ │ │ │ ├── Readme.txt
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── dataTables.scroller.css
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ ├── api_scrolling.html
│ │ │ │ │ │ ├── data/
│ │ │ │ │ │ │ ├── 2500.txt
│ │ │ │ │ │ │ └── ssp.php
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── large_js_source.html
│ │ │ │ │ │ ├── server-side_processing.html
│ │ │ │ │ │ ├── simple.html
│ │ │ │ │ │ └── state_saving.html
│ │ │ │ │ └── js/
│ │ │ │ │ └── dataTables.scroller.js
│ │ │ │ └── TableTools/
│ │ │ │ ├── Readme.md
│ │ │ │ ├── css/
│ │ │ │ │ └── dataTables.tableTools.css
│ │ │ │ ├── examples/
│ │ │ │ │ ├── ajax.html
│ │ │ │ │ ├── alter_buttons.html
│ │ │ │ │ ├── bootstrap.html
│ │ │ │ │ ├── button_text.html
│ │ │ │ │ ├── collection.html
│ │ │ │ │ ├── defaults.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jqueryui.html
│ │ │ │ │ ├── multi_instance.html
│ │ │ │ │ ├── multiple_tables.html
│ │ │ │ │ ├── new_init.html
│ │ │ │ │ ├── pdf_message.html
│ │ │ │ │ ├── plug-in.html
│ │ │ │ │ ├── select_column.html
│ │ │ │ │ ├── select_multi.html
│ │ │ │ │ ├── select_os.html
│ │ │ │ │ ├── select_single.html
│ │ │ │ │ ├── simple.html
│ │ │ │ │ └── swf_path.html
│ │ │ │ ├── images/
│ │ │ │ │ └── psd/
│ │ │ │ │ ├── collection.psd
│ │ │ │ │ ├── copy document.psd
│ │ │ │ │ ├── file_types.psd
│ │ │ │ │ └── printer.psd
│ │ │ │ ├── js/
│ │ │ │ │ └── dataTables.tableTools.js
│ │ │ │ └── swf/
│ │ │ │ ├── copy_csv_xls.swf
│ │ │ │ └── copy_csv_xls_pdf.swf
│ │ │ ├── jquery.dataTables.css
│ │ │ ├── jquery.dataTables.js
│ │ │ └── jquery.dataTables_themeroller.css
│ │ ├── datepicker/
│ │ │ ├── bootstrap-datepicker.js
│ │ │ ├── datepicker3.css
│ │ │ └── locales/
│ │ │ ├── bootstrap-datepicker.ar.js
│ │ │ ├── bootstrap-datepicker.az.js
│ │ │ ├── bootstrap-datepicker.bg.js
│ │ │ ├── bootstrap-datepicker.ca.js
│ │ │ ├── bootstrap-datepicker.cs.js
│ │ │ ├── bootstrap-datepicker.cy.js
│ │ │ ├── bootstrap-datepicker.da.js
│ │ │ ├── bootstrap-datepicker.de.js
│ │ │ ├── bootstrap-datepicker.el.js
│ │ │ ├── bootstrap-datepicker.es.js
│ │ │ ├── bootstrap-datepicker.et.js
│ │ │ ├── bootstrap-datepicker.fa.js
│ │ │ ├── bootstrap-datepicker.fi.js
│ │ │ ├── bootstrap-datepicker.fr.js
│ │ │ ├── bootstrap-datepicker.gl.js
│ │ │ ├── bootstrap-datepicker.he.js
│ │ │ ├── bootstrap-datepicker.hr.js
│ │ │ ├── bootstrap-datepicker.hu.js
│ │ │ ├── bootstrap-datepicker.id.js
│ │ │ ├── bootstrap-datepicker.is.js
│ │ │ ├── bootstrap-datepicker.it.js
│ │ │ ├── bootstrap-datepicker.ja.js
│ │ │ ├── bootstrap-datepicker.ka.js
│ │ │ ├── bootstrap-datepicker.kk.js
│ │ │ ├── bootstrap-datepicker.kr.js
│ │ │ ├── bootstrap-datepicker.lt.js
│ │ │ ├── bootstrap-datepicker.lv.js
│ │ │ ├── bootstrap-datepicker.mk.js
│ │ │ ├── bootstrap-datepicker.ms.js
│ │ │ ├── bootstrap-datepicker.nb.js
│ │ │ ├── bootstrap-datepicker.nl-BE.js
│ │ │ ├── bootstrap-datepicker.nl.js
│ │ │ ├── bootstrap-datepicker.no.js
│ │ │ ├── bootstrap-datepicker.pl.js
│ │ │ ├── bootstrap-datepicker.pt-BR.js
│ │ │ ├── bootstrap-datepicker.pt.js
│ │ │ ├── bootstrap-datepicker.ro.js
│ │ │ ├── bootstrap-datepicker.rs-latin.js
│ │ │ ├── bootstrap-datepicker.rs.js
│ │ │ ├── bootstrap-datepicker.ru.js
│ │ │ ├── bootstrap-datepicker.sk.js
│ │ │ ├── bootstrap-datepicker.sl.js
│ │ │ ├── bootstrap-datepicker.sq.js
│ │ │ ├── bootstrap-datepicker.sv.js
│ │ │ ├── bootstrap-datepicker.sw.js
│ │ │ ├── bootstrap-datepicker.th.js
│ │ │ ├── bootstrap-datepicker.tr.js
│ │ │ ├── bootstrap-datepicker.ua.js
│ │ │ ├── bootstrap-datepicker.vi.js
│ │ │ ├── bootstrap-datepicker.zh-CN.js
│ │ │ └── bootstrap-datepicker.zh-TW.js
│ │ ├── daterangepicker/
│ │ │ ├── daterangepicker.css
│ │ │ ├── daterangepicker.js
│ │ │ └── moment.js
│ │ ├── fa_picker/
│ │ │ ├── css/
│ │ │ │ └── fontawesome-iconpicker.css
│ │ │ └── js/
│ │ │ └── fontawesome-iconpicker.js
│ │ ├── fastclick/
│ │ │ └── fastclick.js
│ │ ├── flot/
│ │ │ ├── excanvas.js
│ │ │ ├── jquery.colorhelpers.js
│ │ │ ├── jquery.flot.canvas.js
│ │ │ ├── jquery.flot.categories.js
│ │ │ ├── jquery.flot.crosshair.js
│ │ │ ├── jquery.flot.errorbars.js
│ │ │ ├── jquery.flot.fillbetween.js
│ │ │ ├── jquery.flot.image.js
│ │ │ ├── jquery.flot.js
│ │ │ ├── jquery.flot.navigate.js
│ │ │ ├── jquery.flot.pie.js
│ │ │ ├── jquery.flot.resize.js
│ │ │ ├── jquery.flot.selection.js
│ │ │ ├── jquery.flot.stack.js
│ │ │ ├── jquery.flot.symbol.js
│ │ │ ├── jquery.flot.threshold.js
│ │ │ └── jquery.flot.time.js
│ │ ├── fullcalendar/
│ │ │ ├── fullcalendar.css
│ │ │ ├── fullcalendar.js
│ │ │ └── fullcalendar.print.css
│ │ ├── iCheck/
│ │ │ ├── all.css
│ │ │ ├── flat/
│ │ │ │ ├── _all.css
│ │ │ │ ├── aero.css
│ │ │ │ ├── blue.css
│ │ │ │ ├── flat.css
│ │ │ │ ├── green.css
│ │ │ │ ├── grey.css
│ │ │ │ ├── orange.css
│ │ │ │ ├── pink.css
│ │ │ │ ├── purple.css
│ │ │ │ ├── red.css
│ │ │ │ └── yellow.css
│ │ │ ├── futurico/
│ │ │ │ └── futurico.css
│ │ │ ├── icheck.js
│ │ │ ├── line/
│ │ │ │ ├── _all.css
│ │ │ │ ├── aero.css
│ │ │ │ ├── blue.css
│ │ │ │ ├── green.css
│ │ │ │ ├── grey.css
│ │ │ │ ├── line.css
│ │ │ │ ├── orange.css
│ │ │ │ ├── pink.css
│ │ │ │ ├── purple.css
│ │ │ │ ├── red.css
│ │ │ │ └── yellow.css
│ │ │ ├── minimal/
│ │ │ │ ├── _all.css
│ │ │ │ ├── aero.css
│ │ │ │ ├── blue.css
│ │ │ │ ├── green.css
│ │ │ │ ├── grey.css
│ │ │ │ ├── minimal.css
│ │ │ │ ├── orange.css
│ │ │ │ ├── pink.css
│ │ │ │ ├── purple.css
│ │ │ │ ├── red.css
│ │ │ │ └── yellow.css
│ │ │ ├── polaris/
│ │ │ │ └── polaris.css
│ │ │ └── square/
│ │ │ ├── _all.css
│ │ │ ├── aero.css
│ │ │ ├── blue.css
│ │ │ ├── green.css
│ │ │ ├── grey.css
│ │ │ ├── orange.css
│ │ │ ├── pink.css
│ │ │ ├── purple.css
│ │ │ ├── red.css
│ │ │ ├── square.css
│ │ │ └── yellow.css
│ │ ├── input-mask/
│ │ │ ├── jquery.inputmask.date.extensions.js
│ │ │ ├── jquery.inputmask.extensions.js
│ │ │ ├── jquery.inputmask.js
│ │ │ ├── jquery.inputmask.numeric.extensions.js
│ │ │ ├── jquery.inputmask.phone.extensions.js
│ │ │ ├── jquery.inputmask.regex.extensions.js
│ │ │ └── phone-codes/
│ │ │ ├── phone-be.json
│ │ │ ├── phone-codes.json
│ │ │ └── readme.txt
│ │ ├── ionslider/
│ │ │ ├── ion.rangeSlider.css
│ │ │ ├── ion.rangeSlider.skinFlat.css
│ │ │ └── ion.rangeSlider.skinNice.css
│ │ ├── jQueryUI/
│ │ │ └── jquery-ui.js
│ │ ├── jqueryvalidation/
│ │ │ ├── additional-methods.js
│ │ │ ├── jquery.validate.js
│ │ │ └── localization/
│ │ │ ├── messages_ar.js
│ │ │ ├── messages_bg.js
│ │ │ ├── messages_bn_BD.js
│ │ │ ├── messages_ca.js
│ │ │ ├── messages_cs.js
│ │ │ ├── messages_da.js
│ │ │ ├── messages_de.js
│ │ │ ├── messages_el.js
│ │ │ ├── messages_es.js
│ │ │ ├── messages_es_AR.js
│ │ │ ├── messages_es_PE.js
│ │ │ ├── messages_et.js
│ │ │ ├── messages_eu.js
│ │ │ ├── messages_fa.js
│ │ │ ├── messages_fi.js
│ │ │ ├── messages_fr.js
│ │ │ ├── messages_ge.js
│ │ │ ├── messages_gl.js
│ │ │ ├── messages_he.js
│ │ │ ├── messages_hr.js
│ │ │ ├── messages_hu.js
│ │ │ ├── messages_hy_AM.js
│ │ │ ├── messages_id.js
│ │ │ ├── messages_is.js
│ │ │ ├── messages_it.js
│ │ │ ├── messages_ja.js
│ │ │ ├── messages_ka.js
│ │ │ ├── messages_kk.js
│ │ │ ├── messages_ko.js
│ │ │ ├── messages_lt.js
│ │ │ ├── messages_lv.js
│ │ │ ├── messages_mk.js
│ │ │ ├── messages_my.js
│ │ │ ├── messages_nl.js
│ │ │ ├── messages_no.js
│ │ │ ├── messages_pl.js
│ │ │ ├── messages_pt_BR.js
│ │ │ ├── messages_pt_PT.js
│ │ │ ├── messages_ro.js
│ │ │ ├── messages_ru.js
│ │ │ ├── messages_si.js
│ │ │ ├── messages_sk.js
│ │ │ ├── messages_sl.js
│ │ │ ├── messages_sr.js
│ │ │ ├── messages_sr_lat.js
│ │ │ ├── messages_sv.js
│ │ │ ├── messages_th.js
│ │ │ ├── messages_tj.js
│ │ │ ├── messages_tr.js
│ │ │ ├── messages_uk.js
│ │ │ ├── messages_vi.js
│ │ │ ├── messages_zh.js
│ │ │ ├── messages_zh_TW.js
│ │ │ ├── methods_de.js
│ │ │ ├── methods_es_CL.js
│ │ │ ├── methods_fi.js
│ │ │ ├── methods_nl.js
│ │ │ └── methods_pt.js
│ │ ├── jvectormap/
│ │ │ ├── jquery-jvectormap-1.2.2.css
│ │ │ ├── jquery-jvectormap-usa-en.js
│ │ │ └── jquery-jvectormap-world-mill-en.js
│ │ ├── knob/
│ │ │ └── jquery.knob.js
│ │ ├── morris/
│ │ │ ├── morris.css
│ │ │ └── morris.js
│ │ ├── pace/
│ │ │ ├── pace.css
│ │ │ └── pace.js
│ │ ├── select2/
│ │ │ ├── i18n/
│ │ │ │ ├── ar.js
│ │ │ │ ├── az.js
│ │ │ │ ├── bg.js
│ │ │ │ ├── ca.js
│ │ │ │ ├── cs.js
│ │ │ │ ├── da.js
│ │ │ │ ├── de.js
│ │ │ │ ├── el.js
│ │ │ │ ├── en.js
│ │ │ │ ├── es.js
│ │ │ │ ├── et.js
│ │ │ │ ├── eu.js
│ │ │ │ ├── fa.js
│ │ │ │ ├── fi.js
│ │ │ │ ├── fr.js
│ │ │ │ ├── gl.js
│ │ │ │ ├── he.js
│ │ │ │ ├── hi.js
│ │ │ │ ├── hr.js
│ │ │ │ ├── hu.js
│ │ │ │ ├── id.js
│ │ │ │ ├── is.js
│ │ │ │ ├── it.js
│ │ │ │ ├── ja.js
│ │ │ │ ├── km.js
│ │ │ │ ├── ko.js
│ │ │ │ ├── lt.js
│ │ │ │ ├── lv.js
│ │ │ │ ├── mk.js
│ │ │ │ ├── ms.js
│ │ │ │ ├── nb.js
│ │ │ │ ├── nl.js
│ │ │ │ ├── pl.js
│ │ │ │ ├── pt-BR.js
│ │ │ │ ├── pt.js
│ │ │ │ ├── ro.js
│ │ │ │ ├── ru.js
│ │ │ │ ├── sk.js
│ │ │ │ ├── sr-Cyrl.js
│ │ │ │ ├── sr.js
│ │ │ │ ├── sv.js
│ │ │ │ ├── th.js
│ │ │ │ ├── tr.js
│ │ │ │ ├── uk.js
│ │ │ │ ├── vi.js
│ │ │ │ ├── zh-CN.js
│ │ │ │ └── zh-TW.js
│ │ │ ├── select2.css
│ │ │ ├── select2.full.js
│ │ │ └── select2.js
│ │ ├── slimScroll/
│ │ │ └── jquery.slimscroll.js
│ │ ├── sparkline/
│ │ │ └── jquery.sparkline.js
│ │ └── timepicker/
│ │ ├── bootstrap-timepicker.css
│ │ └── bootstrap-timepicker.js
│ ├── css/
│ │ ├── app.css
│ │ ├── bootstrap.css
│ │ └── shop-homepage.css
│ ├── index.php
│ ├── js/
│ │ ├── app.js
│ │ ├── bootstrap.js
│ │ └── jquery.js
│ ├── robots.txt
│ └── web.config
├── resources/
│ ├── assets/
│ │ ├── js/
│ │ │ ├── app.js
│ │ │ ├── bootstrap.js
│ │ │ └── components/
│ │ │ └── Example.vue
│ │ └── sass/
│ │ ├── _variables.scss
│ │ └── app.scss
│ ├── lang/
│ │ ├── bg/
│ │ │ └── global.php
│ │ ├── de/
│ │ │ └── global.php
│ │ ├── en/
│ │ │ ├── auth.php
│ │ │ ├── global.php
│ │ │ ├── pagination.php
│ │ │ ├── passwords.php
│ │ │ └── validation.php
│ │ ├── es/
│ │ │ └── global.php
│ │ ├── gr/
│ │ │ └── global.php
│ │ ├── hi/
│ │ │ └── global.php
│ │ ├── id/
│ │ │ └── global.php
│ │ ├── lt/
│ │ │ └── global.php
│ │ ├── nl/
│ │ │ └── global.php
│ │ ├── pt/
│ │ │ └── global.php
│ │ └── tr/
│ │ └── global.php
│ └── views/
│ ├── actionsTemplate.blade.php
│ ├── admin/
│ │ ├── courses/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── lessons/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── permissions/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── questions/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── questions_options/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── roles/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ ├── tests/
│ │ │ ├── create.blade.php
│ │ │ ├── edit.blade.php
│ │ │ ├── index.blade.php
│ │ │ └── show.blade.php
│ │ └── users/
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ └── show.blade.php
│ ├── auth/
│ │ ├── change_password.blade.php
│ │ ├── emails/
│ │ │ └── password.blade.php
│ │ ├── login.blade.php
│ │ ├── passwords/
│ │ │ ├── email.blade.php
│ │ │ └── reset.blade.php
│ │ └── register.blade.php
│ ├── course.blade.php
│ ├── errors/
│ │ ├── 404.blade.php
│ │ └── 503.blade.php
│ ├── home.blade.php
│ ├── index.blade.php
│ ├── layouts/
│ │ ├── app.blade.php
│ │ ├── auth.blade.php
│ │ ├── course.blade.php
│ │ ├── home.blade.php
│ │ └── home_global.blade.php
│ ├── lesson.blade.php
│ ├── partials/
│ │ ├── head.blade.php
│ │ ├── header.blade.php
│ │ ├── javascripts.blade.php
│ │ ├── sidebar.blade.php
│ │ └── topbar.blade.php
│ ├── vendor/
│ │ └── .gitkeep
│ └── welcome.blade.php
├── routes/
│ ├── api.php
│ ├── channels.php
│ ├── console.php
│ └── web.php
├── server.php
├── storage/
│ ├── app/
│ │ └── .gitignore
│ ├── framework/
│ │ ├── .gitignore
│ │ ├── cache/
│ │ │ └── .gitignore
│ │ ├── sessions/
│ │ │ └── .gitignore
│ │ ├── testing/
│ │ │ └── .gitignore
│ │ └── views/
│ │ └── .gitignore
│ └── logs/
│ └── .gitignore
├── tests/
│ ├── CreatesApplication.php
│ ├── Feature/
│ │ └── ExampleTest.php
│ ├── TestCase.php
│ └── Unit/
│ └── ExampleTest.php
└── webpack.mix.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: mazbaul
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/workflows/phpmd.yml
================================================
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# PHPMD is a spin-off project of PHP Depend and
# aims to be a PHP equivalent of the well known Java tool PMD.
# What PHPMD does is: It takes a given PHP source code base
# and look for several potential problems within that source.
# These problems can be things like:
# Possible bugs
# Suboptimal code
# Overcomplicated expressions
# Unused parameters, methods, properties
# More details at https://phpmd.org/
name: PHPMD
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '27 20 * * 4'
permissions:
contents: read
jobs:
PHPMD:
name: Run PHPMD scanning
runs-on: ubuntu-latest
permissions:
contents: read # for checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@aa1fe473f9c687b6fb896056d771232c0bc41161
with:
coverage: none
tools: phpmd
- name: Run PHPMD
run: phpmd . sarif codesize --reportfile phpmd-results.sarif
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: phpmd-results.sarif
wait-for-processing: true
================================================
FILE: .gitignore
================================================
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
.env
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Mazbaul Alam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
## Laravel Learning Management System
Simple mini-project created using QuickAdminPanel and Adminlte.
### Features
- course Management
- Lessons Management
- User Management
- Exam and result Management
- Payment system Using Stripe
- Question And Test
## How to Install
- git clonehttps://github.com/bestmomo/laravel5-example.gitprojectname
- cd projectname
- composer install
- php artisan key:generate
- Create a database and inform .env
- php artisan migrate --seed to create and populate tables
- php artisan serve to start the app on http://localhost:8000/
Note:admin login email:admin@admin.com Password:password
### License
Please use and re-use however you want.
================================================
FILE: app/Console/Kernel.php
================================================
command('inspire')
// ->hourly();
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
================================================
FILE: app/Course.php
================================================
attributes['price'] = $input ? $input : null;
}
/**
* Set attribute to date format
* @param $input
*/
public function setStartDateAttribute($input)
{
if ($input != null && $input != '') {
$this->attributes['start_date'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');
} else {
$this->attributes['start_date'] = null;
}
}
/**
* Get attribute from date format
* @param $input
*
* @return string
*/
public function getStartDateAttribute($input)
{
$zeroDate = str_replace(['Y', 'm', 'd'], ['0000', '00', '00'], config('app.date_format'));
if ($input != $zeroDate && $input != null) {
return Carbon::createFromFormat('Y-m-d', $input)->format(config('app.date_format'));
} else {
return '';
}
}
public function teachers()
{
return $this->belongsToMany(User::class, 'course_user');
}
public function students()
{
return $this->belongsToMany(User::class, 'course_student')->withTimestamps()->withPivot(['rating']);
}
public function lessons()
{
return $this->hasMany(Lesson::class)->orderBy('position');
}
public function publishedLessons()
{
return $this->hasMany(Lesson::class)->orderBy('position')->where('published', 1);
}
public function scopeOfTeacher($query)
{
if (!Auth::user()->isAdmin()) {
return $query->whereHas('teachers', function($q) {
$q->where('user_id', Auth::user()->id);
});
}
return $query;
}
public function getRatingAttribute()
{
return number_format(\DB::table('course_student')->where('course_id', $this->attributes['id'])->average('rating'), 2);
}
}
================================================
FILE: app/Exceptions/Handler.php
================================================
expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest(route('auth.login'));
}
}
================================================
FILE: app/Http/Controllers/Admin/CoursesController.php
================================================
ofTeacher()->get();
} else {
$courses = Course::ofTeacher()->get();
}
return view('admin.courses.index', compact('courses'));
}
/**
* Show the form for creating new Course.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
if (! Gate::allows('course_create')) {
return abort(401);
}
$teachers = \App\User::whereHas('role', function ($q) { $q->where('role_id', 2); } )->get()->pluck('name', 'id');
return view('admin.courses.create', compact('teachers'));
}
/**
* Store a newly created Course in storage.
*
* @param \App\Http\Requests\StoreCoursesRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreCoursesRequest $request)
{
if (! Gate::allows('course_create')) {
return abort(401);
}
$request = $this->saveFiles($request);
$course = Course::create($request->all());
$teachers = \Auth::user()->isAdmin() ? array_filter((array)$request->input('teachers')) : [\Auth::user()->id];
$course->teachers()->sync($teachers);
return redirect()->route('admin.courses.index');
}
/**
* Show the form for editing Course.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('course_edit')) {
return abort(401);
}
$teachers = \App\User::whereHas('role', function ($q) { $q->where('role_id', 2); } )->get()->pluck('name', 'id');
$course = Course::findOrFail($id);
return view('admin.courses.edit', compact('course', 'teachers'));
}
/**
* Update Course in storage.
*
* @param \App\Http\Requests\UpdateCoursesRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateCoursesRequest $request, $id)
{
if (! Gate::allows('course_edit')) {
return abort(401);
}
$request = $this->saveFiles($request);
$course = Course::findOrFail($id);
$course->update($request->all());
$teachers = \Auth::user()->isAdmin() ? array_filter((array)$request->input('teachers')) : [\Auth::user()->id];
$course->teachers()->sync($teachers);
return redirect()->route('admin.courses.index');
}
/**
* Display Course.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('course_view')) {
return abort(401);
}
$teachers = \App\User::get()->pluck('name', 'id');$lessons = \App\Lesson::where('course_id', $id)->get();$tests = \App\Test::where('course_id', $id)->get();
$course = Course::findOrFail($id);
return view('admin.courses.show', compact('course', 'lessons', 'tests'));
}
/**
* Remove Course from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('course_delete')) {
return abort(401);
}
$course = Course::findOrFail($id);
$course->delete();
return redirect()->route('admin.courses.index');
}
/**
* Delete all selected Course at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('course_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Course::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
/**
* Restore Course from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function restore($id)
{
if (! Gate::allows('course_delete')) {
return abort(401);
}
$course = Course::onlyTrashed()->findOrFail($id);
$course->restore();
return redirect()->route('admin.courses.index');
}
/**
* Permanently delete Course from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function perma_del($id)
{
if (! Gate::allows('course_delete')) {
return abort(401);
}
$course = Course::onlyTrashed()->findOrFail($id);
$course->forceDelete();
return redirect()->route('admin.courses.index');
}
}
================================================
FILE: app/Http/Controllers/Admin/DashboardController.php
================================================
middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
}
================================================
FILE: app/Http/Controllers/Admin/LessonsController.php
================================================
pluck('id'));
if ($request->input('course_id')) {
$lessons = $lessons->where('course_id', $request->input('course_id'));
}
if (request('show_deleted') == 1) {
if (! Gate::allows('lesson_delete')) {
return abort(401);
}
$lessons = $lessons->onlyTrashed()->get();
} else {
$lessons = $lessons->get();
}
return view('admin.lessons.index', compact('lessons'));
}
/**
* Show the form for creating new Lesson.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
if (! Gate::allows('lesson_create')) {
return abort(401);
}
$courses = \App\Course::ofTeacher()->get()->pluck('title', 'id')->prepend('Please select', '');
return view('admin.lessons.create', compact('courses'));
}
/**
* Store a newly created Lesson in storage.
*
* @param \App\Http\Requests\StoreLessonsRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreLessonsRequest $request)
{
if (! Gate::allows('lesson_create')) {
return abort(401);
}
$request = $this->saveFiles($request);
$lesson = Lesson::create($request->all()
+ ['position' => Lesson::where('course_id', $request->course_id)->max('position') + 1]);
foreach ($request->input('downloadable_files_id', []) as $index => $id) {
$model = config('laravel-medialibrary.media_model');
$file = $model::find($id);
$file->model_id = $lesson->id;
$file->save();
}
return redirect()->route('admin.lessons.index', ['course_id' => $request->course_id]);
}
/**
* Show the form for editing Lesson.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('lesson_edit')) {
return abort(401);
}
$courses = \App\Course::ofTeacher()->get()->pluck('title', 'id')->prepend('Please select', '');
$lesson = Lesson::findOrFail($id);
return view('admin.lessons.edit', compact('lesson', 'courses'));
}
/**
* Update Lesson in storage.
*
* @param \App\Http\Requests\UpdateLessonsRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateLessonsRequest $request, $id)
{
if (! Gate::allows('lesson_edit')) {
return abort(401);
}
$request = $this->saveFiles($request);
$lesson = Lesson::findOrFail($id);
$lesson->update($request->all());
$media = [];
foreach ($request->input('downloadable_files_id', []) as $index => $id) {
$model = config('laravel-medialibrary.media_model');
$file = $model::find($id);
$file->model_id = $lesson->id;
$file->save();
$media[] = $file;
}
$lesson->updateMedia($media, 'downloadable_files');
return redirect()->route('admin.lessons.index', ['course_id' => $request->course_id]);
}
/**
* Display Lesson.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('lesson_view')) {
return abort(401);
}
$courses = \App\Course::get()->pluck('title', 'id')->prepend('Please select', '');$tests = \App\Test::where('lesson_id', $id)->get();
$lesson = Lesson::findOrFail($id);
return view('admin.lessons.show', compact('lesson', 'tests'));
}
/**
* Remove Lesson from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('lesson_delete')) {
return abort(401);
}
$lesson = Lesson::findOrFail($id);
$lesson->delete();
return redirect()->route('admin.lessons.index');
}
/**
* Delete all selected Lesson at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('lesson_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Lesson::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
/**
* Restore Lesson from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function restore($id)
{
if (! Gate::allows('lesson_delete')) {
return abort(401);
}
$lesson = Lesson::onlyTrashed()->findOrFail($id);
$lesson->restore();
return redirect()->route('admin.lessons.index');
}
/**
* Permanently delete Lesson from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function perma_del($id)
{
if (! Gate::allows('lesson_delete')) {
return abort(401);
}
$lesson = Lesson::onlyTrashed()->findOrFail($id);
$lesson->forceDelete();
return redirect()->route('admin.lessons.index');
}
}
================================================
FILE: app/Http/Controllers/Admin/PermissionsController.php
================================================
all());
return redirect()->route('admin.permissions.index');
}
/**
* Show the form for editing Permission.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('permission_edit')) {
return abort(401);
}
$permission = Permission::findOrFail($id);
return view('admin.permissions.edit', compact('permission'));
}
/**
* Update Permission in storage.
*
* @param \App\Http\Requests\UpdatePermissionsRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdatePermissionsRequest $request, $id)
{
if (! Gate::allows('permission_edit')) {
return abort(401);
}
$permission = Permission::findOrFail($id);
$permission->update($request->all());
return redirect()->route('admin.permissions.index');
}
/**
* Display Permission.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('permission_view')) {
return abort(401);
}
$roles = \App\Role::whereHas('permission',
function ($query) use ($id) {
$query->where('id', $id);
})->get();
$permission = Permission::findOrFail($id);
return view('admin.permissions.show', compact('permission', 'roles'));
}
/**
* Remove Permission from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('permission_delete')) {
return abort(401);
}
$permission = Permission::findOrFail($id);
$permission->delete();
return redirect()->route('admin.permissions.index');
}
/**
* Delete all selected Permission at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('permission_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Permission::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
}
================================================
FILE: app/Http/Controllers/Admin/QuestionsController.php
================================================
get();
} else {
$questions = Question::all();
}
return view('admin.questions.index', compact('questions'));
}
/**
* Show the form for creating new Question.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
if (! Gate::allows('question_create')) {
return abort(401);
}
$tests = \App\Test::get()->pluck('title', 'id');
return view('admin.questions.create', compact('tests'));
}
/**
* Store a newly created Question in storage.
*
* @param \App\Http\Requests\StoreQuestionsRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreQuestionsRequest $request)
{
if (! Gate::allows('question_create')) {
return abort(401);
}
$request = $this->saveFiles($request);
$question = Question::create($request->all());
$question->tests()->sync(array_filter((array)$request->input('tests')));
for ($q=1; $q <= 4; $q++) {
$option = $request->input('option_text_' . $q, '');
if ($option != '') {
QuestionsOption::create([
'question_id' => $question->id,
'option_text' => $option,
'correct' => $request->input('correct_' . $q)
]);
}
}
return redirect()->route('admin.questions.index');
}
/**
* Show the form for editing Question.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('question_edit')) {
return abort(401);
}
$question = Question::findOrFail($id);
$tests = \App\Test::get()->pluck('title', 'id');
return view('admin.questions.edit', compact('question', 'tests'));
}
/**
* Update Question in storage.
*
* @param \App\Http\Requests\UpdateQuestionsRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateQuestionsRequest $request, $id)
{
if (! Gate::allows('question_edit')) {
return abort(401);
}
$request = $this->saveFiles($request);
$question = Question::findOrFail($id);
$question->update($request->all());
$question->tests()->sync(array_filter((array)$request->input('tests')));
return redirect()->route('admin.questions.index');
}
/**
* Display Question.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('question_view')) {
return abort(401);
}
$questions_options = \App\QuestionsOption::where('question_id', $id)->get();$tests = \App\Test::whereHas('questions',
function ($query) use ($id) {
$query->where('id', $id);
})->get();
$question = Question::findOrFail($id);
return view('admin.questions.show', compact('question', 'questions_options', 'tests'));
}
/**
* Remove Question from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('question_delete')) {
return abort(401);
}
$question = Question::findOrFail($id);
$question->delete();
return redirect()->route('admin.questions.index');
}
/**
* Delete all selected Question at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('question_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Question::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
/**
* Restore Question from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function restore($id)
{
if (! Gate::allows('question_delete')) {
return abort(401);
}
$question = Question::onlyTrashed()->findOrFail($id);
$question->restore();
return redirect()->route('admin.questions.index');
}
/**
* Permanently delete Question from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function perma_del($id)
{
if (! Gate::allows('question_delete')) {
return abort(401);
}
$question = Question::onlyTrashed()->findOrFail($id);
$question->forceDelete();
return redirect()->route('admin.questions.index');
}
}
================================================
FILE: app/Http/Controllers/Admin/QuestionsOptionsController.php
================================================
get();
} else {
$questions_options = QuestionsOption::all();
}
return view('admin.questions_options.index', compact('questions_options'));
}
/**
* Show the form for creating new QuestionsOption.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
if (! Gate::allows('questions_option_create')) {
return abort(401);
}
$questions = \App\Question::get()->pluck('question', 'id')->prepend('Please select', '');
return view('admin.questions_options.create', compact('questions'));
}
/**
* Store a newly created QuestionsOption in storage.
*
* @param \App\Http\Requests\StoreQuestionsOptionsRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreQuestionsOptionsRequest $request)
{
if (! Gate::allows('questions_option_create')) {
return abort(401);
}
$questions_option = QuestionsOption::create($request->all());
return redirect()->route('admin.questions_options.index');
}
/**
* Show the form for editing QuestionsOption.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('questions_option_edit')) {
return abort(401);
}
$questions = \App\Question::get()->pluck('question', 'id')->prepend('Please select', '');
$questions_option = QuestionsOption::findOrFail($id);
return view('admin.questions_options.edit', compact('questions_option', 'questions'));
}
/**
* Update QuestionsOption in storage.
*
* @param \App\Http\Requests\UpdateQuestionsOptionsRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateQuestionsOptionsRequest $request, $id)
{
if (! Gate::allows('questions_option_edit')) {
return abort(401);
}
$questions_option = QuestionsOption::findOrFail($id);
$questions_option->update($request->all());
return redirect()->route('admin.questions_options.index');
}
/**
* Display QuestionsOption.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('questions_option_view')) {
return abort(401);
}
$questions_option = QuestionsOption::findOrFail($id);
return view('admin.questions_options.show', compact('questions_option'));
}
/**
* Remove QuestionsOption from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('questions_option_delete')) {
return abort(401);
}
$questions_option = QuestionsOption::findOrFail($id);
$questions_option->delete();
return redirect()->route('admin.questions_options.index');
}
/**
* Delete all selected QuestionsOption at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('questions_option_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = QuestionsOption::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
/**
* Restore QuestionsOption from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function restore($id)
{
if (! Gate::allows('questions_option_delete')) {
return abort(401);
}
$questions_option = QuestionsOption::onlyTrashed()->findOrFail($id);
$questions_option->restore();
return redirect()->route('admin.questions_options.index');
}
/**
* Permanently delete QuestionsOption from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function perma_del($id)
{
if (! Gate::allows('questions_option_delete')) {
return abort(401);
}
$questions_option = QuestionsOption::onlyTrashed()->findOrFail($id);
$questions_option->forceDelete();
return redirect()->route('admin.questions_options.index');
}
}
================================================
FILE: app/Http/Controllers/Admin/RolesController.php
================================================
pluck('title', 'id');
return view('admin.roles.create', compact('permissions'));
}
/**
* Store a newly created Role in storage.
*
* @param \App\Http\Requests\StoreRolesRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreRolesRequest $request)
{
if (! Gate::allows('role_create')) {
return abort(401);
}
$role = Role::create($request->all());
$role->permission()->sync(array_filter((array)$request->input('permission')));
return redirect()->route('admin.roles.index');
}
/**
* Show the form for editing Role.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('role_edit')) {
return abort(401);
}
$permissions = \App\Permission::get()->pluck('title', 'id');
$role = Role::findOrFail($id);
return view('admin.roles.edit', compact('role', 'permissions'));
}
/**
* Update Role in storage.
*
* @param \App\Http\Requests\UpdateRolesRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRolesRequest $request, $id)
{
if (! Gate::allows('role_edit')) {
return abort(401);
}
$role = Role::findOrFail($id);
$role->update($request->all());
$role->permission()->sync(array_filter((array)$request->input('permission')));
return redirect()->route('admin.roles.index');
}
/**
* Display Role.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('role_view')) {
return abort(401);
}
$permissions = \App\Permission::get()->pluck('title', 'id');$users = \App\User::whereHas('role',
function ($query) use ($id) {
$query->where('id', $id);
})->get();
$role = Role::findOrFail($id);
return view('admin.roles.show', compact('role', 'users'));
}
/**
* Remove Role from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('role_delete')) {
return abort(401);
}
$role = Role::findOrFail($id);
$role->delete();
return redirect()->route('admin.roles.index');
}
/**
* Delete all selected Role at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('role_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Role::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
}
================================================
FILE: app/Http/Controllers/Admin/SpatieMediaController.php
================================================
has('model_name') && ! $request->has('file_key') && ! $request->has('bucket')) {
return abort(500);
}
$model = 'App\\' . $request->input('model_name');
try {
$model = new $model();
} catch (ModelNotFoundException $e) {
abort(500, 'Model not found');
}
$files = $request->file($request->input('file_key'));
$addedFiles = [];
foreach ($files as $file) {
try {
$media = $model->addMedia($file)->toMediaLibrary($request->input('bucket'));
$addedFiles[] = $media;
} catch (\Exception $e) {
abort(500, 'Could not upload your file');
}
}
return response()->json(['files' => $addedFiles]);
}
}
================================================
FILE: app/Http/Controllers/Admin/TestsController.php
================================================
get();
} else {
$tests = Test::all();
}
return view('admin.tests.index', compact('tests'));
}
/**
* Show the form for creating new Test.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
if (! Gate::allows('test_create')) {
return abort(401);
}
$courses = \App\Course::ofTeacher()->get();
$courses_ids = $courses->pluck('id');
$courses = $courses->pluck('title', 'id')->prepend('Please select', '');
$lessons = \App\Lesson::whereIn('course_id', $courses_ids)->get()->pluck('title', 'id')->prepend('Please select', '');
return view('admin.tests.create', compact('courses', 'lessons'));
}
/**
* Store a newly created Test in storage.
*
* @param \App\Http\Requests\StoreTestsRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreTestsRequest $request)
{
if (! Gate::allows('test_create')) {
return abort(401);
}
$test = Test::create($request->all());
return redirect()->route('admin.tests.index');
}
/**
* Show the form for editing Test.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('test_edit')) {
return abort(401);
}
$courses = \App\Course::ofTeacher()->get();
$courses_ids = $courses->pluck('id');
$courses = $courses->pluck('title', 'id')->prepend('Please select', '');
$lessons = \App\Lesson::whereIn('course_id', $courses_ids)->get()->pluck('title', 'id')->prepend('Please select', '');
$test = Test::findOrFail($id);
return view('admin.tests.edit', compact('test', 'courses', 'lessons'));
}
/**
* Update Test in storage.
*
* @param \App\Http\Requests\UpdateTestsRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateTestsRequest $request, $id)
{
if (! Gate::allows('test_edit')) {
return abort(401);
}
$test = Test::findOrFail($id);
$test->update($request->all());
return redirect()->route('admin.tests.index');
}
/**
* Display Test.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('test_view')) {
return abort(401);
}
$test = Test::findOrFail($id);
return view('admin.tests.show', compact('test'));
}
/**
* Remove Test from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('test_delete')) {
return abort(401);
}
$test = Test::findOrFail($id);
$test->delete();
return redirect()->route('admin.tests.index');
}
/**
* Delete all selected Test at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('test_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = Test::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
/**
* Restore Test from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function restore($id)
{
if (! Gate::allows('test_delete')) {
return abort(401);
}
$test = Test::onlyTrashed()->findOrFail($id);
$test->restore();
return redirect()->route('admin.tests.index');
}
/**
* Permanently delete Test from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function perma_del($id)
{
if (! Gate::allows('test_delete')) {
return abort(401);
}
$test = Test::onlyTrashed()->findOrFail($id);
$test->forceDelete();
return redirect()->route('admin.tests.index');
}
}
================================================
FILE: app/Http/Controllers/Admin/UsersController.php
================================================
pluck('title', 'id');
return view('admin.users.create', compact('roles'));
}
/**
* Store a newly created User in storage.
*
* @param \App\Http\Requests\StoreUsersRequest $request
* @return \Illuminate\Http\Response
*/
public function store(StoreUsersRequest $request)
{
if (! Gate::allows('user_create')) {
return abort(401);
}
$user = User::create($request->all());
$user->role()->sync(array_filter((array)$request->input('role')));
return redirect()->route('admin.users.index');
}
/**
* Show the form for editing User.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
if (! Gate::allows('user_edit')) {
return abort(401);
}
$roles = \App\Role::get()->pluck('title', 'id');
$user = User::findOrFail($id);
return view('admin.users.edit', compact('user', 'roles'));
}
/**
* Update User in storage.
*
* @param \App\Http\Requests\UpdateUsersRequest $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateUsersRequest $request, $id)
{
if (! Gate::allows('user_edit')) {
return abort(401);
}
$user = User::findOrFail($id);
$user->update($request->all());
$user->role()->sync(array_filter((array)$request->input('role')));
return redirect()->route('admin.users.index');
}
/**
* Display User.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
if (! Gate::allows('user_view')) {
return abort(401);
}
$roles = \App\Role::get()->pluck('title', 'id');$courses = \App\Course::whereHas('teachers',
function ($query) use ($id) {
$query->where('id', $id);
})->get();
$user = User::findOrFail($id);
return view('admin.users.show', compact('user', 'courses'));
}
/**
* Remove User from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
if (! Gate::allows('user_delete')) {
return abort(401);
}
$user = User::findOrFail($id);
$user->delete();
return redirect()->route('admin.users.index');
}
/**
* Delete all selected User at once.
*
* @param Request $request
*/
public function massDestroy(Request $request)
{
if (! Gate::allows('user_delete')) {
return abort(401);
}
if ($request->input('ids')) {
$entries = User::whereIn('id', $request->input('ids'))->get();
foreach ($entries as $entry) {
$entry->delete();
}
}
}
}
================================================
FILE: app/Http/Controllers/Auth/ChangePasswordController.php
================================================
middleware('auth');
}
/**
* Where to redirect users after password is changed.
*
* @var string $redirectTo
*/
protected $redirectTo = '/change_password';
/**
* Change password form
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function showChangePasswordForm()
{
$user = Auth::getUser();
return view('auth.change_password', compact('user'));
}
/**
* Change password.
*
* @param Request $request
* @return $this|\Illuminate\Http\RedirectResponse
*/
public function changePassword(Request $request)
{
$user = Auth::getUser();
$this->validator($request->all())->validate();
if (Hash::check($request->get('current_password'), $user->password)) {
$user->password = $request->get('new_password');
$user->save();
return redirect($this->redirectTo)->with('success', 'Password change successfully!');
} else {
return redirect()->back()->withErrors('Current password is incorrect');
}
}
/**
* Get a validator for an incoming change password request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'current_password' => 'required',
'new_password' => 'required|min:6|confirmed',
]);
}
}
================================================
FILE: app/Http/Controllers/Auth/ForgotPasswordController.php
================================================
middleware('guest');
}
}
================================================
FILE: app/Http/Controllers/Auth/LoginController.php
================================================
middleware('guest', ['except' => 'logout']);
}
}
================================================
FILE: app/Http/Controllers/Auth/RegisterController.php
================================================
middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
/**
* Handle a registration request for the application.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function register(Request $request)
{
$this->validator($request->all())->validate();
event(new Registered($user = $this->create($request->all())));
$user->role()->sync([3]);
$this->guard()->login($user);
return $this->registered($request, $user)
?: redirect($request->input('redirect_url'));
}
}
================================================
FILE: app/Http/Controllers/Auth/ResetPasswordController.php
================================================
middleware('guest');
}
}
================================================
FILE: app/Http/Controllers/Controller.php
================================================
with('publishedLessons')->firstOrFail();
$purchased_course = \Auth::check() && $course->students()->where('user_id', \Auth::id())->count() > 0;
return view('course', compact('course', 'purchased_course'));
}
public function payment(Request $request)
{
$course = Course::findOrFail($request->get('course_id'));
$this->createStripeCharge($request);
$course->students()->attach(\Auth::id());
return redirect()->back()->with('success', 'Payment completed successfully.');
}
private function createStripeCharge($request)
{
Stripe::setApiKey(env('STRIPE_API_KEY'));
try {
$customer = Customer::create([
'email' => $request->get('stripeEmail'),
'source' => $request->get('stripeToken')
]);
$charge = Charge::create([
'customer' => $customer->id,
'amount' => $request->get('amount'),
'currency' => "usd"
]);
} catch (\Stripe\Error\Base $e) {
return redirect()->back()->withError($e->getMessage())->send();
}
}
public function rating($course_id, Request $request)
{
$course = Course::findOrFail($course_id);
$course->students()->updateExistingPivot(\Auth::id(), ['rating' => $request->get('rating')]);
return redirect()->back()->with('success', 'Thank you for rating.');
}
}
================================================
FILE: app/Http/Controllers/HomeController.php
================================================
where('id', \Auth::id());
})
->with('lessons')
->orderBy('id', 'desc')
->get();
}
$courses = Course::where('published', 1)->orderBy('id', 'desc')->get();
return view('index', compact('courses', 'purchased_courses'));
}
}
================================================
FILE: app/Http/Controllers/LessonsController.php
================================================
where('course_id', $course_id)->firstOrFail();
if (\Auth::check())
{
if ($lesson->students()->where('id', \Auth::id())->count() == 0) {
$lesson->students()->attach(\Auth::id());
}
}
$test_result = NULL;
if ($lesson->test) {
$test_result = TestsResult::where('test_id', $lesson->test->id)
->where('user_id', \Auth::id())
->first();
}
$previous_lesson = Lesson::where('course_id', $lesson->course_id)
->where('position', '<', $lesson->position)
->orderBy('position', 'desc')
->first();
$next_lesson = Lesson::where('course_id', $lesson->course_id)
->where('position', '>', $lesson->position)
->orderBy('position', 'asc')
->first();
$purchased_course = $lesson->course->students()->where('user_id', \Auth::id())->count() > 0;
$test_exists = FALSE;
if ($lesson->test && $lesson->test->questions->count() > 0) {
$test_exists = TRUE;
}
return view('lesson', compact('lesson', 'previous_lesson', 'next_lesson', 'test_result',
'purchased_course', 'test_exists'));
}
public function test($lesson_slug, Request $request)
{
$lesson = Lesson::where('slug', $lesson_slug)->firstOrFail();
$answers = [];
$test_score = 0;
foreach ($request->get('questions') as $question_id => $answer_id) {
$question = Question::find($question_id);
$correct = QuestionsOption::where('question_id', $question_id)
->where('id', $answer_id)
->where('correct', 1)->count() > 0;
$answers[] = [
'question_id' => $question_id,
'option_id' => $answer_id,
'correct' => $correct
];
if ($correct) {
$test_score += $question->score;
}
/*
* Save the answer
* Check if it is correct and then add points
* Save all test result and show the points
*/
}
$test_result = TestsResult::create([
'test_id' => $lesson->test->id,
'user_id' => \Auth::id(),
'test_result' => $test_score
]);
$test_result->answers()->createMany($answers);
return redirect()->route('lessons.show', [$lesson->course_id, $lesson_slug])->with('message', 'Test score: ' . $test_score);
}
}
================================================
FILE: app/Http/Controllers/Traits/FileUploadTrait.php
================================================
all() as $key => $value) {
if ($request->hasFile($key)) {
if ($request->has($key . '_max_width') && $request->has($key . '_max_height')) {
// Check file width
$filename = time() . '-' . $request->file($key)->getClientOriginalName();
$file = $request->file($key);
$image = Image::make($file);
if (! file_exists(public_path('uploads/thumb'))) {
mkdir(public_path('uploads/thumb'), 0777, true);
}
Image::make($file)->resize(50, 50)->save(public_path('uploads/thumb') . '/' . $filename);
$width = $image->width();
$height = $image->height();
if ($width > $request->{$key . '_max_width'} && $height > $request->{$key . '_max_height'}) {
$image->resize($request->{$key . '_max_width'}, $request->{$key . '_max_height'});
} elseif ($width > $request->{$key . '_max_width'}) {
$image->resize($request->{$key . '_max_width'}, null, function ($constraint) {
$constraint->aspectRatio();
});
} elseif ($height > $request->{$key . '_max_width'}) {
$image->resize(null, $request->{$key . '_max_height'}, function ($constraint) {
$constraint->aspectRatio();
});
}
Image::make($file)->resize(320, 150)->save(public_path('uploads') . '/' . $filename);
$finalRequest = new Request(array_merge($finalRequest->all(), [$key => $filename]));
} else {
$filename = time() . '-' . $request->file($key)->getClientOriginalName();
$request->file($key)->move(public_path('uploads'), $filename);
$finalRequest = new Request(array_merge($finalRequest->all(), [$key => $filename]));
}
}
}
return $finalRequest;
}
}
================================================
FILE: app/Http/Kernel.php
================================================
[
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'admin' => \App\Http\Middleware\AdminMiddleware::class,
];
}
================================================
FILE: app/Http/Middleware/AdminMiddleware.php
================================================
role()->where('title', 'Student')->count() > 0) {
return redirect('/');
}
return $next($request);
}
}
================================================
FILE: app/Http/Middleware/EncryptCookies.php
================================================
check()) {
return redirect('/admin/home');
}
return $next($request);
}
}
================================================
FILE: app/Http/Middleware/TrimStrings.php
================================================
'exists:users,id',
'title' => 'required',
'start_date' => 'date_format:'.config('app.date_format'),
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreLessonsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StorePermissionsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreQuestionsOptionsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreQuestionsRequest.php
================================================
'required',
'score' => 'max:2147483647|required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreRolesRequest.php
================================================
'required',
'permission' => 'required',
'permission.*' => 'exists:permissions,id',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreTestsRequest.php
================================================
'exists:questions,id',
];
}
}
================================================
FILE: app/Http/Requests/Admin/StoreUsersRequest.php
================================================
'required',
'email' => 'required|email|unique:users,email',
'password' => 'required',
'role' => 'required',
'role.*' => 'exists:roles,id',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateCoursesRequest.php
================================================
'exists:users,id',
'title' => 'required',
'start_date' => 'date_format:'.config('app.date_format'),
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateLessonsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdatePermissionsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateQuestionsOptionsRequest.php
================================================
'required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateQuestionsRequest.php
================================================
'required',
'score' => 'max:2147483647|required',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateRolesRequest.php
================================================
'required',
'permission' => 'required',
'permission.*' => 'exists:permissions,id',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateTestsRequest.php
================================================
'exists:questions,id',
];
}
}
================================================
FILE: app/Http/Requests/Admin/UpdateUsersRequest.php
================================================
'required',
'email' => 'required|email|unique:users,email,'.$this->route('user'),
'role' => 'required',
'role.*' => 'exists:roles,id',
];
}
}
================================================
FILE: app/Lesson.php
================================================
attributes['course_id'] = $input ? $input : null;
}
/**
* Set attribute to money format
* @param $input
*/
public function setPositionAttribute($input)
{
$this->attributes['position'] = $input ? $input : null;
}
public function course()
{
return $this->belongsTo(Course::class, 'course_id')->withTrashed();
}
public function test() {
return $this->hasOne('App\Test');
}
public function students()
{
return $this->belongsToMany('App\User', 'lesson_student')->withTimestamps();
}
}
================================================
FILE: app/Permission.php
================================================
items)->pluck($a, $b);
});
}
}
================================================
FILE: app/Providers/AuthServiceProvider.php
================================================
'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
$user = \Auth::user();
if (! app()->runningInConsole()) {
$roles = Role::with('permission')->get();
foreach ($roles as $role) {
foreach ($role->permission as $permission) {
$permissionArray[$permission->title][] = $role->id;
}
}
foreach ($permissionArray as $title => $roles) {
Gate::define($title, function (User $user) use ($roles) {
return count(array_intersect($user->role->pluck('id')->toArray(), $roles));
});
}
}
}
}
================================================
FILE: app/Providers/BroadcastServiceProvider.php
================================================
[
'App\Listeners\EventListener',
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
================================================
FILE: app/Providers/RouteServiceProvider.php
================================================
mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
================================================
FILE: app/Question.php
================================================
attributes['score'] = $input ? $input : null;
}
public function options()
{
return $this->hasMany('App\QuestionsOption');
}
public function tests()
{
return $this->belongsToMany(Test::class, 'question_test');
}
}
================================================
FILE: app/QuestionsOption.php
================================================
attributes['question_id'] = $input ? $input : null;
}
public function question()
{
return $this->belongsTo(Question::class, 'question_id')->withTrashed();
}
}
================================================
FILE: app/Role.php
================================================
belongsToMany(Permission::class, 'permission_role');
}
}
================================================
FILE: app/Test.php
================================================
attributes['course_id'] = $input ? $input : null;
}
/**
* Set to null if empty
* @param $input
*/
public function setLessonIdAttribute($input)
{
$this->attributes['lesson_id'] = $input ? $input : null;
}
public function course()
{
return $this->belongsTo(Course::class, 'course_id')->withTrashed();
}
public function lesson()
{
return $this->belongsTo(Lesson::class, 'lesson_id')->withTrashed();
}
public function questions()
{
return $this->belongsToMany(Question::class, 'question_test')->withTrashed();
}
}
================================================
FILE: app/TestsResult.php
================================================
hasMany('App\TestsResultsAnswer');
}
}
================================================
FILE: app/TestsResultsAnswer.php
================================================
attributes['password'] = app('hash')->needsRehash($input) ? Hash::make($input) : $input;
}
public function role()
{
return $this->belongsToMany(Role::class, 'role_user');
}
public function isAdmin()
{
return $this->role()->where('role_id', 1)->first();
}
public function lessons()
{
return $this->belongsToMany('App\Lesson', 'lesson_student');
}
}
================================================
FILE: artisan
================================================
#!/usr/bin/env php
make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);
================================================
FILE: bootstrap/app.php
================================================
singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
================================================
FILE: bootstrap/autoload.php
================================================
=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.3",
"intervention/image": "^2.3",
"doctrine/dbal": "^2.5",
"unisharp/laravel-filemanager": "^1.7",
"spatie/laravel-medialibrary": "^3.0",
"stripe/stripe-php": "^3.21"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
================================================
FILE: config/app.php
================================================
'LMS',
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Date Format
|--------------------------------------------------------------------------
|
| Here you may specify the default date format for your application, which
| will be used with date and date-time functions.
|
*/
'date_format' => 'Y-m-d',
'date_format_js' => 'yy-mm-dd',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
Laravel\Tinker\TinkerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class,
Spatie\MediaLibrary\MediaLibraryServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
/*
* Package Aliases
*/
'Image' => Intervention\Image\Facades\Image::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
],
];
================================================
FILE: config/auth.php
================================================
[
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
],
],
];
================================================
FILE: config/broadcasting.php
================================================
env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
================================================
FILE: config/cache.php
================================================
env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => 'laravel',
];
================================================
FILE: config/database.php
================================================
env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
];
================================================
FILE: config/filesystems.php
================================================
'local',
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => 's3',
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'media' => [
'driver' => 'local',
'root' => public_path('uploads'),
'url' => env('APP_URL') . '/uploads',
'visibility' => 'public',
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
],
];
================================================
FILE: config/laravel-medialibrary.php
================================================
'media',
/*
* The maximum file size of an item in bytes. Adding a file
* that is larger will result in an exception.
*/
'max_file_size' => 1024 * 1024 * 10,
/*
* This queue will used to generate derived images.
* Leave empty to use the default queue.
*/
'queue_name' => '',
/*
* The class name of the media model to be used.
*/
'media_model' => Spatie\MediaLibrary\Media::class,
/*
* When urls to files get generated this class will be called. Leave empty
* if your files are stored locally above the site root or on s3.
*/
'custom_url_generator_class' => null,
/*
* The class that contains the strategy for determining a media file's path.
*/
'custom_path_generator_class' => null,
's3' => [
/*
* The domain that should be prepended when generating urls.
*/
'domain' => 'https://xxxxxxx.s3.amazonaws.com',
],
'remote' => [
/*
* Any extra headers that should be included when uploading media to
* a remote disk. Even though supported headers may vary between
* different drivers, a sensible default has been provided.
*
* Supported by S3: CacheControl, Expires, StorageClass,
* ServerSideEncryption, Metadata, ACL, ContentEncoding
*/
'extra_headers' => [
'CacheControl' => 'max-age=604800',
]
]
];
================================================
FILE: config/mail.php
================================================
env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
================================================
FILE: config/queue.php
================================================
env('QUEUE_DRIVER', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
],
'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 90,
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];
================================================
FILE: config/services.php
================================================
[
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
================================================
FILE: config/session.php
================================================
env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => 120,
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => null,
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
|
*/
'store' => null,
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => 'laravel_session',
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you if it can not be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE', false),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
];
================================================
FILE: config/view.php
================================================
[
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => realpath(storage_path('framework/views')),
];
================================================
FILE: database/.gitignore
================================================
*.sqlite
================================================
FILE: database/factories/CourseFactory.php
================================================
define(App\Course::class, function (Faker\Generator $faker) {
$name = $faker->name;
return [
'title' => $name,
'slug' => str_slug($name),
'description' => $faker->text(),
'price' => $faker->randomFloat(2, 0, 199),
'published' => 1,
];
});
================================================
FILE: database/factories/LessonFactory.php
================================================
define(App\Lesson::class, function (Faker\Generator $faker) {
$name = $faker->text(50);
return [
'title' => $name,
'slug' => str_slug($name),
'short_text' => $faker->paragraph(),
'full_text' => $faker->text(1000),
'position' => rand(1, 10),
'free_lesson' => rand(0, 1),
'published' => rand(0, 1),
];
});
================================================
FILE: database/factories/ModelFactory.php
================================================
define(App\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});
================================================
FILE: database/factories/QuestionFactory.php
================================================
define(App\Question::class, function (Faker\Generator $faker) {
return [
'question' => $faker->text(50) . '?',
'score' => 1,
];
});
================================================
FILE: database/factories/QuestionsOptionFactory.php
================================================
define(App\QuestionsOption::class, function (Faker\Generator $faker) {
return [
'option_text' => $faker->text(50) . '?',
'correct' => rand(0, 1),
];
});
================================================
FILE: database/factories/TestFactory.php
================================================
define(App\Test::class, function (Faker\Generator $faker) {
return [
'title' => $faker->text(50),
'published' => 1,
];
});
================================================
FILE: database/migrations/2014_10_12_100000_create_password_resets_table.php
================================================
string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}
================================================
FILE: database/migrations/2017_07_19_082005_create_1500441605_permissions_table.php
================================================
increments('id');
$table->string('title');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permissions');
}
}
================================================
FILE: database/migrations/2017_07_19_082006_create_1500441606_roles_table.php
================================================
increments('id');
$table->string('title');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('roles');
}
}
================================================
FILE: database/migrations/2017_07_19_082009_create_1500441609_users_table.php
================================================
increments('id');
$table->string('name');
$table->string('email');
$table->string('password');
$table->string('remember_token')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
================================================
FILE: database/migrations/2017_07_19_082347_create_1500441827_courses_table.php
================================================
increments('id');
$table->string('title');
$table->string('slug')->nullable();
$table->text('description')->nullable();
$table->decimal('price', 15, 2)->nullable();
$table->string('course_image')->nullable();
$table->date('start_date')->nullable();
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('courses');
}
}
================================================
FILE: database/migrations/2017_07_19_082723_create_1500442043_lessons_table.php
================================================
increments('id');
$table->integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', '54419_596eedbb6686e')->references('id')->on('courses')->onDelete('cascade');
$table->string('title')->nullable();
$table->string('slug')->nullable();
$table->string('lesson_image')->nullable();
$table->text('short_text')->nullable();
$table->text('full_text')->nullable();
$table->integer('position')->nullable()->unsigned();
$table->tinyInteger('free_lesson')->nullable()->default(0);
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lessons');
}
}
================================================
FILE: database/migrations/2017_07_19_082724_create_media_table.php
================================================
increments('id');
$table->nullableMorphs('model');
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('disk');
$table->unsignedInteger('size');
$table->text('manipulations');
$table->text('custom_properties');
$table->unsignedInteger('order_column')->nullable();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('media');
}
}
================================================
FILE: database/migrations/2017_07_19_082929_create_1500442169_questions_table.php
================================================
increments('id');
$table->text('question');
$table->string('question_image')->nullable();
$table->integer('score')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('questions');
}
}
================================================
FILE: database/migrations/2017_07_19_083047_create_1500442247_questions_options_table.php
================================================
increments('id');
$table->integer('question_id')->unsigned()->nullable();
$table->foreign('question_id', '54421_596eee8745a1e')->references('id')->on('questions')->onDelete('cascade');
$table->text('option_text');
$table->tinyInteger('correct')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('questions_options');
}
}
================================================
FILE: database/migrations/2017_07_19_083236_create_1500442356_tests_table.php
================================================
increments('id');
$table->integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', '54422_596eeef514d00')->references('id')->on('courses')->onDelete('cascade');
$table->integer('lesson_id')->unsigned()->nullable();
$table->foreign('lesson_id', '54422_596eeef53411a')->references('id')->on('lessons')->onDelete('cascade');
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tests');
}
}
================================================
FILE: database/migrations/2017_07_19_120427_create_596eec08307cd_permission_role_table.php
================================================
integer('permission_id')->unsigned()->nullable();
$table->foreign('permission_id', 'fk_p_54415_54416_role_per_596eec08308d0')->references('id')->on('permissions')->onDelete('cascade');
$table->integer('role_id')->unsigned()->nullable();
$table->foreign('role_id', 'fk_p_54416_54415_permissi_596eec0830986')->references('id')->on('roles')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permission_role');
}
}
================================================
FILE: database/migrations/2017_07_19_120430_create_596eec0af366b_role_user_table.php
================================================
integer('role_id')->unsigned()->nullable();
$table->foreign('role_id', 'fk_p_54416_54417_user_rol_596eec0af3746')->references('id')->on('roles')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id', 'fk_p_54417_54416_role_use_596eec0af37c1')->references('id')->on('users')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('role_user');
}
}
================================================
FILE: database/migrations/2017_07_19_120808_create_596eece522a6e_course_user_table.php
================================================
integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', 'fk_p_54418_54417_user_cou_596eece522b73')->references('id')->on('courses')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id', 'fk_p_54417_54418_course_u_596eece522bee')->references('id')->on('users')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('course_user');
}
}
================================================
FILE: database/migrations/2017_07_19_121657_create_596eeef709839_question_test_table.php
================================================
integer('question_id')->unsigned()->nullable();
$table->foreign('question_id', 'fk_p_54420_54422_test_que_596eeef70992f')->references('id')->on('questions')->onDelete('cascade');
$table->integer('test_id')->unsigned()->nullable();
$table->foreign('test_id', 'fk_p_54422_54420_question_596eeef7099af')->references('id')->on('tests')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('question_test');
}
}
================================================
FILE: database/migrations/2017_08_14_085956_create_course_students_table.php
================================================
integer('course_id')->unsigned()->nullable();
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('course_student');
}
}
================================================
FILE: database/migrations/2017_08_17_051131_create_tests_results_table.php
================================================
increments('id');
$table->integer('test_id')->unsigned()->nullable();
$table->foreign('test_id')->references('id')->on('tests')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->integer('test_result');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tests_results');
}
}
================================================
FILE: database/migrations/2017_08_17_051254_create_tests_results_answers_table.php
================================================
increments('id');
$table->integer('tests_result_id')->unsigned()->nullable();
$table->foreign('tests_result_id')->references('id')->on('tests_results')->onDelete('cascade');
$table->integer('question_id')->unsigned()->nullable();
$table->foreign('question_id')->references('id')->on('questions')->onDelete('cascade');
$table->integer('option_id')->unsigned()->nullable();
$table->foreign('option_id')->references('id')->on('questions_options')->onDelete('cascade');
$table->tinyInteger('correct')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tests_results_answers');
}
}
================================================
FILE: database/migrations/2017_08_18_054622_create_lesson_student_table.php
================================================
integer('lesson_id')->unsigned()->nullable();
$table->foreign('lesson_id')->references('id')->on('lessons')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lesson_student');
}
}
================================================
FILE: database/migrations/2017_08_18_060324_add_rating_to_course_student_table.php
================================================
integer('rating')->unsigned()->default(0)->after('user_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('course_student', function (Blueprint $table) {
$table->dropColumn('rating');
});
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082005_create_combined_1500441605_permissions_table.php
================================================
increments('id');
$table->string('title');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permissions');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082006_create_combined_1500441606_roles_table.php
================================================
increments('id');
$table->string('title');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('roles');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082009_create_combined_1500441609_users_table.php
================================================
increments('id');
$table->string('name');
$table->string('email');
$table->string('password');
$table->string('remember_token')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082347_create_combined_1500441827_courses_table.php
================================================
increments('id');
$table->string('title');
$table->string('slug')->nullable();
$table->text('description')->nullable();
$table->decimal('price', 15, 2)->nullable();
$table->string('course_image')->nullable();
$table->date('start_date')->nullable();
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('courses');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082723_create_combined_1500442043_lessons_table.php
================================================
increments('id');
$table->integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', '54419_596eedbb6686e')->references('id')->on('courses')->onDelete('cascade');
$table->string('title')->nullable();
$table->string('slug')->nullable();
$table->string('lesson_image')->nullable();
$table->text('short_text')->nullable();
$table->text('full_text')->nullable();
$table->integer('position')->nullable()->unsigned();
$table->tinyInteger('free_lesson')->nullable()->default(0);
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lessons');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_082929_create_combined_1500442169_questions_table.php
================================================
increments('id');
$table->text('question');
$table->string('question_image')->nullable();
$table->integer('score')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('questions');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_083047_create_combined_1500442247_questions_options_table.php
================================================
increments('id');
$table->integer('question_id')->unsigned()->nullable();
$table->foreign('question_id', '54421_596eee8745a1e')->references('id')->on('questions')->onDelete('cascade');
$table->text('option_text');
$table->tinyInteger('correct')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('questions_options');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_083236_create_combined_1500442356_tests_table.php
================================================
increments('id');
$table->integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', '54422_596eeef514d00')->references('id')->on('courses')->onDelete('cascade');
$table->integer('lesson_id')->unsigned()->nullable();
$table->foreign('lesson_id', '54422_596eeef53411a')->references('id')->on('lessons')->onDelete('cascade');
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->tinyInteger('published')->nullable()->default(0);
$table->timestamps();
$table->softDeletes();
$table->index(['deleted_at']);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tests');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_120428_create_combined_596eec08307cd_permission_role_table.php
================================================
integer('permission_id')->unsigned()->nullable();
$table->foreign('permission_id', 'fk_p_54415_54416_role_per_596eec08308d0')->references('id')->on('permissions')->onDelete('cascade');
$table->integer('role_id')->unsigned()->nullable();
$table->foreign('role_id', 'fk_p_54416_54415_permissi_596eec0830986')->references('id')->on('roles')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permission_role');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_120431_create_combined_596eec0af366b_role_user_table.php
================================================
integer('role_id')->unsigned()->nullable();
$table->foreign('role_id', 'fk_p_54416_54417_user_rol_596eec0af3746')->references('id')->on('roles')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id', 'fk_p_54417_54416_role_use_596eec0af37c1')->references('id')->on('users')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('role_user');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_120809_create_combined_596eece522a6e_course_user_table.php
================================================
integer('course_id')->unsigned()->nullable();
$table->foreign('course_id', 'fk_p_54418_54417_user_cou_596eece522b73')->references('id')->on('courses')->onDelete('cascade');
$table->integer('user_id')->unsigned()->nullable();
$table->foreign('user_id', 'fk_p_54417_54418_course_u_596eece522bee')->references('id')->on('users')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('course_user');
}
}
================================================
FILE: database/migrations/combined/2017_07_19_121658_create_combined_596eeef709839_question_test_table.php
================================================
integer('question_id')->unsigned()->nullable();
$table->foreign('question_id', 'fk_p_54420_54422_test_que_596eeef70992f')->references('id')->on('questions')->onDelete('cascade');
$table->integer('test_id')->unsigned()->nullable();
$table->foreign('test_id', 'fk_p_54422_54420_question_596eeef7099af')->references('id')->on('tests')->onDelete('cascade');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('question_test');
}
}
================================================
FILE: database/seeds/CourseSeed.php
================================================
create()->each(function ($course) {
$course->teachers()->sync([1]);
$course->lessons()->saveMany(factory(Lesson::class, 10)->create()->each(function ($lesson) {
$lesson->test()->save(factory(Test::class)->create());
}));
});
}
}
================================================
FILE: database/seeds/DatabaseSeeder.php
================================================
call(PermissionSeed::class);
$this->call(RoleSeed::class);
$this->call(UserSeed::class);
$this->call(RoleSeedPivot::class);
$this->call(UserSeedPivot::class);
$this->call(CourseSeed::class);
$this->call(QuestionsSeed::class);
}
}
================================================
FILE: database/seeds/PermissionSeed.php
================================================
1, 'title' => 'user_management_access',],
['id' => 2, 'title' => 'user_management_create',],
['id' => 3, 'title' => 'user_management_edit',],
['id' => 4, 'title' => 'user_management_view',],
['id' => 5, 'title' => 'user_management_delete',],
['id' => 6, 'title' => 'permission_access',],
['id' => 7, 'title' => 'permission_create',],
['id' => 8, 'title' => 'permission_edit',],
['id' => 9, 'title' => 'permission_view',],
['id' => 10, 'title' => 'permission_delete',],
['id' => 11, 'title' => 'role_access',],
['id' => 12, 'title' => 'role_create',],
['id' => 13, 'title' => 'role_edit',],
['id' => 14, 'title' => 'role_view',],
['id' => 15, 'title' => 'role_delete',],
['id' => 16, 'title' => 'user_access',],
['id' => 17, 'title' => 'user_create',],
['id' => 18, 'title' => 'user_edit',],
['id' => 19, 'title' => 'user_view',],
['id' => 20, 'title' => 'user_delete',],
['id' => 21, 'title' => 'course_access',],
['id' => 22, 'title' => 'course_create',],
['id' => 23, 'title' => 'course_edit',],
['id' => 24, 'title' => 'course_view',],
['id' => 25, 'title' => 'course_delete',],
['id' => 26, 'title' => 'lesson_access',],
['id' => 27, 'title' => 'lesson_create',],
['id' => 28, 'title' => 'lesson_edit',],
['id' => 29, 'title' => 'lesson_view',],
['id' => 30, 'title' => 'lesson_delete',],
['id' => 31, 'title' => 'question_access',],
['id' => 32, 'title' => 'question_create',],
['id' => 33, 'title' => 'question_edit',],
['id' => 34, 'title' => 'question_view',],
['id' => 35, 'title' => 'question_delete',],
['id' => 36, 'title' => 'questions_option_access',],
['id' => 37, 'title' => 'questions_option_create',],
['id' => 38, 'title' => 'questions_option_edit',],
['id' => 39, 'title' => 'questions_option_view',],
['id' => 40, 'title' => 'questions_option_delete',],
['id' => 41, 'title' => 'test_access',],
['id' => 42, 'title' => 'test_create',],
['id' => 43, 'title' => 'test_edit',],
['id' => 44, 'title' => 'test_view',],
['id' => 45, 'title' => 'test_delete',],
];
foreach ($items as $item) {
\App\Permission::create($item);
}
}
}
================================================
FILE: database/seeds/QuestionsSeed.php
================================================
create()->each(function ($question) {
$question->options()->saveMany(factory(QuestionsOption::class, 4)->create());
$question->tests()->attach(rand(1,50));
});
}
}
================================================
FILE: database/seeds/RoleSeed.php
================================================
1, 'title' => 'Administrator (can create other users)',],
['id' => 2, 'title' => 'Teacher',],
['id' => 3, 'title' => 'Student',],
];
foreach ($items as $item) {
\App\Role::create($item);
}
}
}
================================================
FILE: database/seeds/RoleSeedPivot.php
================================================
[
'permission' => [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],
],
2 => [
'permission' => [1, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45],
],
3 => [
'permission' => [1, 21, 24, 26, 29, 31, 34, 36, 37, 38, 39, 40, 41, 44],
],
];
foreach ($items as $id => $item) {
$role = \App\Role::find($id);
foreach ($item as $key => $ids) {
$role->{$key}()->sync($ids);
}
}
}
}
================================================
FILE: database/seeds/UserSeed.php
================================================
1, 'name' => 'Admin', 'email' => 'admin@admin.com', 'password' => '$2y$10$l4MghrLnKXTRUDlR07XQeesKHRIaAe7WzDf90g751BEf70AwnJ5m.', 'remember_token' => '',],
];
foreach ($items as $item) {
\App\User::create($item);
}
}
}
================================================
FILE: database/seeds/UserSeedPivot.php
================================================
[
'role' => [1],
],
];
foreach ($items as $id => $item) {
$user = \App\User::find($id);
foreach ($item as $key => $ids) {
$user->{$key}()->sync($ids);
}
}
}
}
================================================
FILE: package.json
================================================
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"bootstrap-sass": "^3.3.7",
"cross-env": "^3.2.3",
"jquery": "^3.1.1",
"laravel-mix": "0.*",
"lodash": "^4.17.4",
"vue": "^2.1.10"
}
}
================================================
FILE: phpunit.xml
================================================
Activate the fixed layout. You can't use fixed and boxed layouts together
" + "Activate the boxed layout
" + "Toggle the left sidebar's state (open or collapse)
" + "Let the sidebar mini expand on hover
" + "Toggle between slide over content and push content effects
" + "Toggle between dark and light skins for the right sidebar
" + "Blue
"); skins_list.append(skin_blue); var skin_black = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Black
"); skins_list.append(skin_black); var skin_purple = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Purple
"); skins_list.append(skin_purple); var skin_green = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Green
"); skins_list.append(skin_green); var skin_red = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Red
"); skins_list.append(skin_red); var skin_yellow = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Yellow
"); skins_list.append(skin_yellow); //Light sidebar skins var skin_blue_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Blue Light
"); skins_list.append(skin_blue_light); var skin_black_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Black Light
"); skins_list.append(skin_black_light); var skin_purple_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Purple Light
"); skins_list.append(skin_purple_light); var skin_green_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Green Light
"); skins_list.append(skin_green_light); var skin_red_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Red Light
"); skins_list.append(skin_red_light); var skin_yellow_light = $("", {style: "float:left; width: 33.33333%; padding: 5px;"}) .append("" + "Yellow Light
"); skins_list.append(skin_yellow_light); demo_settings.append("| ' + tmph + ' | '; } } else { for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) { gridSize[litem]++; html += '' + ((m < 10) ? '0' : '') + m + ' | '; } } html += '