Parcourir la source

Initial commit

jquino il y a 5 ans
Parent
révision
6e0e1e74ae
100 fichiers modifiés avec 172324 ajouts et 0 suppressions
  1. 5
    0
      .gitattributes
  2. 13
    0
      .styleci.yml
  3. 42
    0
      app/Console/Kernel.php
  4. 45
    0
      app/Course.php
  5. 10
    0
      app/Department.php
  6. 51
    0
      app/Exceptions/Handler.php
  7. 27
    0
      app/Helpers/Helper.php
  8. 32
    0
      app/Http/Controllers/Auth/ForgotPasswordController.php
  9. 92
    0
      app/Http/Controllers/Auth/LoginController.php
  10. 72
    0
      app/Http/Controllers/Auth/RegisterController.php
  11. 39
    0
      app/Http/Controllers/Auth/ResetPasswordController.php
  12. 41
    0
      app/Http/Controllers/Auth/VerificationController.php
  13. 13
    0
      app/Http/Controllers/Controller.php
  14. 137
    0
      app/Http/Controllers/CourseController.php
  15. 88
    0
      app/Http/Controllers/DashboardController.php
  16. 126
    0
      app/Http/Controllers/ProfessorController.php
  17. 118
    0
      app/Http/Controllers/SectionController.php
  18. 80
    0
      app/Http/Kernel.php
  19. 21
    0
      app/Http/Middleware/Authenticate.php
  20. 17
    0
      app/Http/Middleware/CheckForMaintenanceMode.php
  21. 17
    0
      app/Http/Middleware/EncryptCookies.php
  22. 26
    0
      app/Http/Middleware/RedirectIfAuthenticated.php
  23. 18
    0
      app/Http/Middleware/TrimStrings.php
  24. 23
    0
      app/Http/Middleware/TrustProxies.php
  25. 24
    0
      app/Http/Middleware/VerifyCsrfToken.php
  26. 44
    0
      app/Professor.php
  27. 30
    0
      app/Providers/AppServiceProvider.php
  28. 30
    0
      app/Providers/AuthServiceProvider.php
  29. 21
    0
      app/Providers/BroadcastServiceProvider.php
  30. 34
    0
      app/Providers/EventServiceProvider.php
  31. 73
    0
      app/Providers/RouteServiceProvider.php
  32. 70
    0
      app/Providers/TelescopeServiceProvider.php
  33. 37
    0
      app/Section.php
  34. 33
    0
      app/Semester.php
  35. 39
    0
      app/User.php
  36. 53
    0
      artisan
  37. 55
    0
      bootstrap/app.php
  38. 2
    0
      bootstrap/cache/.gitignore
  39. 67
    0
      composer.json
  40. 5167
    0
      composer.lock
  41. 234
    0
      config/app.php
  42. 103
    0
      config/auth.php
  43. 59
    0
      config/broadcasting.php
  44. 103
    0
      config/cache.php
  45. 147
    0
      config/database.php
  46. 69
    0
      config/filesystems.php
  47. 52
    0
      config/hashing.php
  48. 94
    0
      config/logging.php
  49. 136
    0
      config/mail.php
  50. 87
    0
      config/queue.php
  51. 52
    0
      config/services.php
  52. 199
    0
      config/session.php
  53. 156
    0
      config/telescope.php
  54. 36
    0
      config/view.php
  55. 2
    0
      database/.gitignore
  56. 15
    0
      database/factories/CourseFactory.php
  57. 12
    0
      database/factories/DepartmentFactory.php
  58. 18
    0
      database/factories/ProfessorFactory.php
  59. 17
    0
      database/factories/ProfessorSectionFactory.php
  60. 16
    0
      database/factories/ProfessorSemesterFactory.php
  61. 20
    0
      database/factories/SectionFactory.php
  62. 27
    0
      database/factories/UserFactory.php
  63. 37
    0
      database/migrations/2014_10_12_000000_create_users_table.php
  64. 32
    0
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  65. 61
    0
      database/migrations/2019_07_07_152338_create_semesters_table.php
  66. 42
    0
      database/migrations/2019_07_07_183013_create_departments_table.php
  67. 36
    0
      database/migrations/2019_07_07_190000_create_courses_table.php
  68. 42
    0
      database/migrations/2019_07_07_191614_create_sections_table.php
  69. 39
    0
      database/migrations/2019_07_07_230040_create_professors_table.php
  70. 38
    0
      database/migrations/2019_07_07_231850_create_professor_semester_table.php
  71. 39
    0
      database/migrations/2019_07_07_231913_create_professor_section_table.php
  72. 17
    0
      database/seeds/CourseSeeder.php
  73. 20
    0
      database/seeds/DatabaseSeeder.php
  74. 21
    0
      database/seeds/ProfessorSectionSeeder.php
  75. 17
    0
      database/seeds/ProfessorSeeder.php
  76. 21
    0
      database/seeds/ProfessorSemesterSeeder.php
  77. 17
    0
      database/seeds/SectionSeeder.php
  78. 10799
    0
      package-lock.json
  79. 41
    0
      package.json
  80. 33
    0
      phpunit.xml
  81. 21
    0
      public/.htaccess
  82. 1
    0
      public/css/addons/datatables.min.css
  83. 13222
    0
      public/css/app.css
  84. 0
    0
      public/favicon.ico
  85. BIN
      public/images/calendar-alt.png
  86. BIN
      public/images/chalkboard-teacher-solid.png
  87. 1
    0
      public/images/chalkboard-teacher-solid.svg
  88. BIN
      public/images/course_1312478.png
  89. BIN
      public/images/file-alt-regular.png
  90. 1
    0
      public/images/file-alt-regular.svg
  91. BIN
      public/images/file-csv.png
  92. BIN
      public/images/uprrp_logo.png
  93. 60
    0
      public/index.php
  94. 124
    0
      public/js/app.js
  95. 145
    0
      public/js/course.js
  96. 69329
    0
      public/js/createPDF.js
  97. 69355
    0
      public/js/dashboard.js
  98. 119
    0
      public/js/prof.js
  99. 8
    0
      public/mix-manifest.json
  100. 0
    0
      public/robots.txt

+ 5
- 0
.gitattributes Voir le fichier

@@ -0,0 +1,5 @@
1
+* text=auto
2
+*.css linguist-vendored
3
+*.scss linguist-vendored
4
+*.js linguist-vendored
5
+CHANGELOG.md export-ignore

+ 13
- 0
.styleci.yml Voir le fichier

@@ -0,0 +1,13 @@
1
+php:
2
+  preset: laravel
3
+  disabled:
4
+    - unused_use
5
+  finder:
6
+    not-name:
7
+      - index.php
8
+      - server.php
9
+js:
10
+  finder:
11
+    not-name:
12
+      - webpack.mix.js
13
+css: true

+ 42
- 0
app/Console/Kernel.php Voir le fichier

@@ -0,0 +1,42 @@
1
+<?php
2
+
3
+namespace App\Console;
4
+
5
+use Illuminate\Console\Scheduling\Schedule;
6
+use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7
+
8
+class Kernel extends ConsoleKernel
9
+{
10
+    /**
11
+     * The Artisan commands provided by your application.
12
+     *
13
+     * @var array
14
+     */
15
+    protected $commands = [
16
+        //
17
+    ];
18
+
19
+    /**
20
+     * Define the application's command schedule.
21
+     *
22
+     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
23
+     * @return void
24
+     */
25
+    protected function schedule(Schedule $schedule)
26
+    {
27
+        // $schedule->command('inspire')
28
+        //          ->hourly();
29
+    }
30
+
31
+    /**
32
+     * Register the commands for the application.
33
+     *
34
+     * @return void
35
+     */
36
+    protected function commands()
37
+    {
38
+        $this->load(__DIR__.'/Commands');
39
+
40
+        require base_path('routes/console.php');
41
+    }
42
+}

+ 45
- 0
app/Course.php Voir le fichier

@@ -0,0 +1,45 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Database\Eloquent\Model;
6
+
7
+class Course extends Model
8
+{
9
+    protected $guarded = [
10
+        'id'
11
+    ];
12
+
13
+    protected $fillable = [
14
+        'code',
15
+        'title',
16
+        'syllabus',
17
+        'dept_id',
18
+    ];
19
+
20
+    public $timestamps = false;
21
+
22
+    public function dept() {
23
+        return $this->belongsTo(Dept::class);
24
+    }
25
+
26
+    public function semesters() {
27
+        // dd($this->hasManyThrough(Semester::class, Section::class, 'course_id', 'code'));
28
+        // dd($this->hasManyThrough(Semester::class, Section::class, 'course_id', 'code')->get());
29
+        return $this->belongsToMany(Semester::class, 'sections');
30
+    }
31
+
32
+    public function sections() {
33
+        return $this->hasMany(Section::class);
34
+    }
35
+
36
+    /**
37
+     * Return count of sections in a given semester.
38
+     *
39
+     * @param string $sem_code
40
+     * @return int
41
+     */
42
+    public function getSemesterSectionCount($sem_code) {
43
+        return $this->sections->where('semester_code', '=', $sem_code)->count();
44
+    }
45
+}

+ 10
- 0
app/Department.php Voir le fichier

@@ -0,0 +1,10 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Database\Eloquent\Model;
6
+
7
+class Department extends Model
8
+{
9
+    public $timestamps = false;
10
+}

+ 51
- 0
app/Exceptions/Handler.php Voir le fichier

@@ -0,0 +1,51 @@
1
+<?php
2
+
3
+namespace App\Exceptions;
4
+
5
+use Exception;
6
+use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
7
+
8
+class Handler extends ExceptionHandler
9
+{
10
+    /**
11
+     * A list of the exception types that are not reported.
12
+     *
13
+     * @var array
14
+     */
15
+    protected $dontReport = [
16
+        //
17
+    ];
18
+
19
+    /**
20
+     * A list of the inputs that are never flashed for validation exceptions.
21
+     *
22
+     * @var array
23
+     */
24
+    protected $dontFlash = [
25
+        'password',
26
+        'password_confirmation',
27
+    ];
28
+
29
+    /**
30
+     * Report or log an exception.
31
+     *
32
+     * @param  \Exception  $exception
33
+     * @return void
34
+     */
35
+    public function report(Exception $exception)
36
+    {
37
+        parent::report($exception);
38
+    }
39
+
40
+    /**
41
+     * Render an exception into an HTTP response.
42
+     *
43
+     * @param  \Illuminate\Http\Request  $request
44
+     * @param  \Exception  $exception
45
+     * @return \Illuminate\Http\Response
46
+     */
47
+    public function render($request, Exception $exception)
48
+    {
49
+        return parent::render($request, $exception);
50
+    }
51
+}

+ 27
- 0
app/Helpers/Helper.php Voir le fichier

@@ -0,0 +1,27 @@
1
+<?php
2
+
3
+if (!function_exists('calcExtraCredits')) {
4
+    /**
5
+     * Calculates extra credits according to http://www.upr.edu/mdocs-posts/certificacion-num-60-2015-2016-enmienda-a-la-cert-105/
6
+     * @param float $credits
7
+     * @param int $student_count
8
+     * @param bool $grad True if graduate course
9
+     * @return float
10
+     */
11
+    function calcExtraCredits($credits, $student_count, $grad = false)
12
+    {
13
+        return max(0, round(($credits ?? 0) * (($student_count ?? 0) - ($grad ? 60 : 30)) / ($grad ? 60 : 30)) / 2);
14
+    }
15
+}
16
+
17
+if (!function_exists('cmpCourseCode')) {
18
+    /**
19
+     * Compares courses by last 4 digits or first 4 characters if digits are equal
20
+     * @param Course $c1, $c2
21
+     * @return int
22
+     */
23
+    function cmpCourseCode($c1, $c2) {
24
+        return (substr($c1->code, -4) - substr($c2->code, -4)) ?: strcmp($c1->code, $c2->code);
25
+    }
26
+
27
+}

+ 32
- 0
app/Http/Controllers/Auth/ForgotPasswordController.php Voir le fichier

@@ -0,0 +1,32 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers\Auth;
4
+
5
+use App\Http\Controllers\Controller;
6
+use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
7
+
8
+class ForgotPasswordController extends Controller
9
+{
10
+    /*
11
+    |--------------------------------------------------------------------------
12
+    | Password Reset Controller
13
+    |--------------------------------------------------------------------------
14
+    |
15
+    | This controller is responsible for handling password reset emails and
16
+    | includes a trait which assists in sending these notifications from
17
+    | your application to your users. Feel free to explore this trait.
18
+    |
19
+    */
20
+
21
+    use SendsPasswordResetEmails;
22
+
23
+    /**
24
+     * Create a new controller instance.
25
+     *
26
+     * @return void
27
+     */
28
+    public function __construct()
29
+    {
30
+        $this->middleware('guest');
31
+    }
32
+}

+ 92
- 0
app/Http/Controllers/Auth/LoginController.php Voir le fichier

@@ -0,0 +1,92 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers\Auth;
4
+
5
+use App\Http\Controllers\Controller;
6
+use Socialite;
7
+use Illuminate\Foundation\Auth\AuthenticatesUsers;
8
+use Illuminate\Foundation\Auth\User;
9
+use Illuminate\Http\Request;
10
+
11
+class LoginController extends Controller
12
+{
13
+    /*
14
+    |--------------------------------------------------------------------------
15
+    | Login Controller
16
+    |--------------------------------------------------------------------------
17
+    |
18
+    | This controller handles authenticating users for the application and
19
+    | redirecting them to your home screen. The controller uses a trait
20
+    | to conveniently provide its functionality to your applications.
21
+    |
22
+    */
23
+
24
+    use AuthenticatesUsers;
25
+
26
+    /**
27
+     * Where to redirect users after login.
28
+     *
29
+     * @var string
30
+     */
31
+    protected $redirectTo = '/dashboard';
32
+
33
+    /**
34
+     * Create a new controller instance.
35
+     *
36
+     * @return void
37
+     */
38
+    public function __construct()
39
+    {
40
+        $this->middleware('guest')->except('logout');
41
+    }
42
+
43
+/**
44
+     * Redirect the user to the GitHub authentication page.
45
+     *
46
+     * @return \Illuminate\Http\Response
47
+     */
48
+    public function redirectToProvider()
49
+    {
50
+        return Socialite::driver('google')->redirect();
51
+    }
52
+
53
+    /**
54
+     * Obtain the user information from GitHub.
55
+     *
56
+     * @return \Illuminate\Http\Response
57
+     */
58
+    public function handleProviderCallback()
59
+    {
60
+        // $user = Socialite::driver('google')->user();
61
+        try {
62
+            $user = Socialite::driver('google')->user();
63
+        } catch (Exception $e) {
64
+            return redirect('/login');
65
+        }
66
+        // only allow people with @company.com to login
67
+        if(explode("@", $user->email)[1] !== 'upr.edu'){
68
+            return redirect()->to('/');
69
+        }
70
+        // check if they're an existing user
71
+        $existingUser = User::where('email', $user->email)->first();
72
+
73
+        if($existingUser){
74
+            // log them in
75
+            auth()->login($existingUser, true);
76
+        } else if (User::all()->count() === 0) {
77
+            // create a new user
78
+            $newUser                  = new User;
79
+            $newUser->name            = $user->name;
80
+            $newUser->email           = $user->email;
81
+            $newUser->google_id       = $user->id;
82
+            $newUser->save();
83
+            auth()->login($newUser, true);
84
+        }
85
+        return redirect()->to('/');
86
+    }
87
+
88
+    public function logout(Request $request) {
89
+        auth()->logout();
90
+        return redirect('/');
91
+    }
92
+}

+ 72
- 0
app/Http/Controllers/Auth/RegisterController.php Voir le fichier

@@ -0,0 +1,72 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers\Auth;
4
+
5
+use App\User;
6
+use App\Http\Controllers\Controller;
7
+use Illuminate\Support\Facades\Hash;
8
+use Illuminate\Support\Facades\Validator;
9
+use Illuminate\Foundation\Auth\RegistersUsers;
10
+
11
+class RegisterController extends Controller
12
+{
13
+    /*
14
+    |--------------------------------------------------------------------------
15
+    | Register Controller
16
+    |--------------------------------------------------------------------------
17
+    |
18
+    | This controller handles the registration of new users as well as their
19
+    | validation and creation. By default this controller uses a trait to
20
+    | provide this functionality without requiring any additional code.
21
+    |
22
+    */
23
+
24
+    use RegistersUsers;
25
+
26
+    /**
27
+     * Where to redirect users after registration.
28
+     *
29
+     * @var string
30
+     */
31
+    protected $redirectTo = '/home';
32
+
33
+    /**
34
+     * Create a new controller instance.
35
+     *
36
+     * @return void
37
+     */
38
+    public function __construct()
39
+    {
40
+        $this->middleware('guest');
41
+    }
42
+
43
+    /**
44
+     * Get a validator for an incoming registration request.
45
+     *
46
+     * @param  array  $data
47
+     * @return \Illuminate\Contracts\Validation\Validator
48
+     */
49
+    protected function validator(array $data)
50
+    {
51
+        return Validator::make($data, [
52
+            'name' => ['required', 'string', 'max:255'],
53
+            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
54
+            'password' => ['required', 'string', 'min:8', 'confirmed'],
55
+        ]);
56
+    }
57
+
58
+    /**
59
+     * Create a new user instance after a valid registration.
60
+     *
61
+     * @param  array  $data
62
+     * @return \App\User
63
+     */
64
+    protected function create(array $data)
65
+    {
66
+        return User::create([
67
+            'name' => $data['name'],
68
+            'email' => $data['email'],
69
+            'password' => Hash::make($data['password']),
70
+        ]);
71
+    }
72
+}

+ 39
- 0
app/Http/Controllers/Auth/ResetPasswordController.php Voir le fichier

@@ -0,0 +1,39 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers\Auth;
4
+
5
+use App\Http\Controllers\Controller;
6
+use Illuminate\Foundation\Auth\ResetsPasswords;
7
+
8
+class ResetPasswordController extends Controller
9
+{
10
+    /*
11
+    |--------------------------------------------------------------------------
12
+    | Password Reset Controller
13
+    |--------------------------------------------------------------------------
14
+    |
15
+    | This controller is responsible for handling password reset requests
16
+    | and uses a simple trait to include this behavior. You're free to
17
+    | explore this trait and override any methods you wish to tweak.
18
+    |
19
+    */
20
+
21
+    use ResetsPasswords;
22
+
23
+    /**
24
+     * Where to redirect users after resetting their password.
25
+     *
26
+     * @var string
27
+     */
28
+    protected $redirectTo = '/home';
29
+
30
+    /**
31
+     * Create a new controller instance.
32
+     *
33
+     * @return void
34
+     */
35
+    public function __construct()
36
+    {
37
+        $this->middleware('guest');
38
+    }
39
+}

+ 41
- 0
app/Http/Controllers/Auth/VerificationController.php Voir le fichier

@@ -0,0 +1,41 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers\Auth;
4
+
5
+use App\Http\Controllers\Controller;
6
+use Illuminate\Foundation\Auth\VerifiesEmails;
7
+
8
+class VerificationController extends Controller
9
+{
10
+    /*
11
+    |--------------------------------------------------------------------------
12
+    | Email Verification Controller
13
+    |--------------------------------------------------------------------------
14
+    |
15
+    | This controller is responsible for handling email verification for any
16
+    | user that recently registered with the application. Emails may also
17
+    | be re-sent if the user didn't receive the original email message.
18
+    |
19
+    */
20
+
21
+    use VerifiesEmails;
22
+
23
+    /**
24
+     * Where to redirect users after verification.
25
+     *
26
+     * @var string
27
+     */
28
+    protected $redirectTo = '/home';
29
+
30
+    /**
31
+     * Create a new controller instance.
32
+     *
33
+     * @return void
34
+     */
35
+    public function __construct()
36
+    {
37
+        $this->middleware('auth');
38
+        $this->middleware('signed')->only('verify');
39
+        $this->middleware('throttle:6,1')->only('verify', 'resend');
40
+    }
41
+}

+ 13
- 0
app/Http/Controllers/Controller.php Voir le fichier

@@ -0,0 +1,13 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers;
4
+
5
+use Illuminate\Foundation\Bus\DispatchesJobs;
6
+use Illuminate\Routing\Controller as BaseController;
7
+use Illuminate\Foundation\Validation\ValidatesRequests;
8
+use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
9
+
10
+class Controller extends BaseController
11
+{
12
+    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
13
+}

+ 137
- 0
app/Http/Controllers/CourseController.php Voir le fichier

@@ -0,0 +1,137 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers;
4
+
5
+use App\Course;
6
+use App\Semester;
7
+use App\User;
8
+use Illuminate\Http\Request;
9
+use Illuminate\Support\Facades\Auth;
10
+use Illuminate\Support\Facades\Redirect;
11
+use Illuminate\Support\Facades\Storage;
12
+
13
+class CourseController extends Controller
14
+{
15
+    /**
16
+     * Display a listing of the resource.
17
+     *
18
+     * @return \Illuminate\Http\Response
19
+     */
20
+    public function index()
21
+    {
22
+        return view('courses.index', [
23
+            'courses' => Course::where('dept_id', '=', 1)->with('sections:id,course_id,semester_code')->get()->sort('cmpCourseCode'),
24
+            'semesters' => Semester::orderBy('code', 'asc')->get(),
25
+        ]);
26
+    }
27
+
28
+    /**
29
+     * Show the form for creating a new resource.
30
+     *
31
+     * @return \Illuminate\Http\Response
32
+     */
33
+    public function create()
34
+    {
35
+    }
36
+
37
+    /**
38
+     * Store a newly created resource in storage.
39
+     *
40
+     * @param  \Illuminate\Http\Request  $request
41
+     * @return \Illuminate\Http\Response
42
+     */
43
+    public function store(Request $request)
44
+    {
45
+        // dd($request->validate(['code'      => ['required','unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string']]));
46
+        $course = Course::create( $request->validate([
47
+            'code'      => ['required','unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
48
+            'title'     => ['required','max:255', 'string'],
49
+            'dept_id'   => ['required','exists:departments,id', 'integer'],
50
+            'syllabus'  => ['nullable','file', 'mimes:pdf']
51
+        ]));
52
+
53
+        if ($request->file('syllabus')) {
54
+            $path = $request->file('syllabus')->store('course_syllabus', 'public');
55
+            $course->update(['syllabus' => asset($path)]);
56
+        }
57
+
58
+        return redirect('/course/' . $course->id);
59
+    }
60
+
61
+    /**
62
+     * Display the specified resource.
63
+     *
64
+     * @param  \App\Course  $course
65
+     * @return \Illuminate\Http\Response
66
+     */
67
+    public function show(Course $course)
68
+    {
69
+        // dd($course->toJson());
70
+        // dump(1);
71
+        // Auth::logout();
72
+        // $semesters = $course->semesters->unique()->loadMissing('sections');
73
+        // $course->loadMissing('semesters.sections');
74
+        // dd($semesters);
75
+        $course->loadMissing(['semesters.sections.professors']);
76
+        // dd($course->semesters->unique());
77
+        // $semesters = $course->sections->groupBy('semester_code')->map( function ($sections) {
78
+        //     return collect(['alpha' => $sections[0]->semester->alpha, 'sections' => $sections->sortBy('code')]);
79
+        // })->sort();
80
+        // dd($semesters);
81
+        // dd($course->loadMissing(['sections.semester']));
82
+        // dd($course->sections->groupBy('semester_code'));
83
+        return view('courses.show', [
84
+            'course' => $course,
85
+            // 'semesters' => $semesters
86
+        ]);
87
+    }
88
+
89
+    /**
90
+     * Show the form for editing the specified resource.
91
+     *
92
+     * @param  \App\Course  $course
93
+     * @return \Illuminate\Http\Response
94
+     */
95
+    public function edit(Course $course)
96
+    {
97
+        //
98
+    }
99
+
100
+    /**
101
+     * Update the specified resource in storage.
102
+     *
103
+     * @param  \Illuminate\Http\Request  $request
104
+     * @param  \App\Course  $course
105
+     * @return \Illuminate\Http\Response
106
+     */
107
+    public function update(Request $request, Course $course)
108
+    {
109
+
110
+        $course->update( $request->validate([
111
+            'code'      => ['unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
112
+            'title'     => ['max:255', 'string'],
113
+            'dept_id'   => ['exists:departments,id', 'integer'],
114
+            'syllabus'  => ['nullable', 'file', 'mimetypes:application/pdf'],
115
+        ]));
116
+
117
+        if ($request->file('syllabus')) {
118
+            $path = $request->file('syllabus')->store('course_syllabus');
119
+            $course->update(['syllabus' => asset($path)]);
120
+        }
121
+        dump(asset($path));
122
+        // dd($course->syllabus);
123
+        return redirect($course->syllabus);
124
+        return redirect('/course');
125
+    }
126
+
127
+    /**
128
+     * Remove the specified resource from storage.
129
+     *
130
+     * @param  \App\Course  $course
131
+     * @return \Illuminate\Http\Response
132
+     */
133
+    public function destroy(Course $course)
134
+    {
135
+        //
136
+    }
137
+}

+ 88
- 0
app/Http/Controllers/DashboardController.php Voir le fichier

@@ -0,0 +1,88 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers;
4
+
5
+use App\Course;
6
+use App\Professor;
7
+use Illuminate\Http\Request;
8
+use App\Semester;
9
+
10
+class DashboardController extends Controller
11
+{
12
+    /**
13
+     * Create a new controller instance.
14
+     *
15
+     * @return void
16
+     */
17
+    public function __construct()
18
+    {
19
+        $this->middleware('auth');
20
+    }
21
+
22
+    /**
23
+     * Show the application dashboard.
24
+     *
25
+     * @return \Illuminate\Contracts\Support\Renderable
26
+     */
27
+    public function index()
28
+    {
29
+        return view('dashboard', [
30
+            'professors' => Professor::orderBy('last_name')->get(),
31
+            'semesters' => Semester::orderBy('code')->get()
32
+        ]);
33
+    }
34
+
35
+    /**
36
+     * Download the schedule for the given semester.
37
+     *
38
+     * @param string $semester
39
+     * @return View
40
+     */
41
+    public function schedule($semester_code) {
42
+        $data = Semester::findOrFail($semester_code);
43
+        $data->courses = $data->courses->sort('cmpCourseCode');
44
+        foreach($data->courses as $course) {
45
+            $course->sections = $course->sections->where('semester_code', '=', $semester_code);
46
+            foreach($course->sections as $section) {
47
+                $section->professors = $section->professors;
48
+            }
49
+        }
50
+        // header('Content-Type: application/pdf');
51
+        // header(`Content-Disposition: attachment; filename="${semester_code}.pdf";`);
52
+        // return $data->toJson();
53
+        return '<script type="text/javascript">var data='.$data->toJson().'</script><script type="text/javascript" src="/js/createPDF.js"></script>';
54
+    }
55
+
56
+    public function export($semester_code) {
57
+        $semester = Semester::findOrFail($semester_code);
58
+        $professors = Professor::with(['sections', 'semesters:code,admin_load,investigative_load'])->whereIn('id', function($query) use ($semester_code) {
59
+            $query->select('professor_id')
60
+            ->from('professor_semester')
61
+            ->where('semester_code', '=', $semester_code);
62
+        })->orWhereIn('id', function($query) use ($semester_code) {
63
+            $query->select('professor_id')
64
+            ->from('sections')
65
+            ->join('professor_section', 'sections.id', '=', 'professor_section.section_id')
66
+            ->where('semester_code', '=', $semester_code);
67
+        })->orderBy('last_name')->get();
68
+        header('Content-Type: application/csv');
69
+        header(`Content-Disposition: attachment; filename="${semester_code}.csv";`);
70
+        if ($file = fopen('php://output', 'w+')) {
71
+            fputcsv($file, ['PROFESOR', 'CARGA ACADEMICA', 'CARGA ADMINISTRATIVA', 'CARGA INVESTIGATIVE', 'CARGA TOTAL']);
72
+            foreach ($professors as $professor) {
73
+                $professor->academic_load = $professor->getAcademicLoad($semester);
74
+                $prof_loads = $professor->semesters->find($semester);
75
+
76
+                fputcsv($file, [
77
+                    $professor->last_name . ', ' . $professor->first_name,
78
+                    $professor->academic_load,
79
+                    $prof_loads->admin_load ?? 0,
80
+                    $prof_loads->investigative_load ?? 0,
81
+                    $professor->academic_load + ($prof_loads->admin_load ?? 0) + ($prof_loads->investigative_load ?? 0),
82
+                ]);
83
+            }
84
+            fclose($file);
85
+            die();
86
+        }
87
+    }
88
+}

+ 126
- 0
app/Http/Controllers/ProfessorController.php Voir le fichier

@@ -0,0 +1,126 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers;
4
+
5
+use App\Professor;
6
+use App\Semester;
7
+use Illuminate\Support\Facades\DB;
8
+use Illuminate\Http\Request;
9
+
10
+class ProfessorController extends Controller
11
+{
12
+    /**
13
+     * Display a listing of the resource.
14
+     *
15
+     * @return \Illuminate\Http\Response
16
+     */
17
+    public function index()
18
+    {
19
+        // dd(Professor::where('dept_id', '=', 1)->with(['sections:semester_code,credits,student_count', 'semesters:semester_code,admin_load,investigative_load'])->orderBy('professors.last_name')->get());
20
+        return view('professors.index', [
21
+            'professors' => Professor::where('dept_id', '=', 1)->with(['sections:semester_code,credits,student_count', 'semesters:semester_code,admin_load,investigative_load'])->orderBy('professors.last_name')->get(),
22
+            'semesters' => Semester::orderBy('semesters.code', 'asc')->get(),
23
+        ]);
24
+    }
25
+
26
+    /**
27
+     * Show the form for creating a new resource.
28
+     *
29
+     * @return \Illuminate\Http\Response
30
+     */
31
+    public function create()
32
+    {
33
+        //
34
+    }
35
+
36
+    /**
37
+     * Store a newly created resource in storage.
38
+     *
39
+     * @param  \Illuminate\Http\Request  $request
40
+     * @return \Illuminate\Http\Response
41
+     */
42
+    public function store(Request $request)
43
+    {
44
+        //
45
+        $professor = Professor::create( $request->validate([
46
+            'num_prof'      => ['required', 'unique:professors', 'max:16', 'string'],
47
+            'first_name'    => ['required', 'max:255', 'string', 'alpha'],
48
+            'last_name'     => ['required', 'max:255', 'string', 'alpha'],
49
+            'email'         => ['nullable', 'email'],
50
+            'type'          => ['nullable', 'in:plantilla,contrato,ta'],
51
+            'dept_id'       => ['required', 'exists:departments,id', 'integer'],
52
+        ]));
53
+        // dd($professor);
54
+
55
+        return redirect('/professor/' . $professor->id);
56
+    }
57
+
58
+    /**
59
+     * Display the specified resource.
60
+     *
61
+     * @param  \App\Professor  $professor
62
+     * @return \Illuminate\Http\Response
63
+     */
64
+    public function show(Professor $professor)
65
+    {
66
+        $professor->loadMissing(['sections.course', 'semesters.sections.course']);
67
+        $loads = $professor->semesters()->get()->keyBy('code');
68
+        $sections = $professor->sections()->with('course:id,code')->get()->groupBy('semester_code');
69
+        $semesters = Semester::whereIn('code', $loads->keys())->orWhereIn('code', $sections->keys())->get();
70
+
71
+        return view('professors.show', compact([
72
+            'professor',
73
+            'semesters',
74
+            'sections',
75
+            'loads'
76
+        ]));
77
+    }
78
+
79
+    /**
80
+     * Show the form for editing the specified resource.
81
+     *
82
+     * @param  \App\Professor  $professor
83
+     * @return \Illuminate\Http\Response
84
+     */
85
+    public function edit(Professor $professor)
86
+    {
87
+        //
88
+    }
89
+
90
+    /**
91
+     * Update the specified resource in storage.
92
+     *
93
+     * @param  \Illuminate\Http\Request  $request
94
+     * @param  \App\Professor  $professor
95
+     * @return \Illuminate\Http\Response
96
+     */
97
+    public function update(Request $request, Professor $professor)
98
+    {
99
+        // TODO: Add logic for updating professor
100
+        if ($request->isMethod('put')) {
101
+            $data = array_filter($request->validate([
102
+                'semester_code'         => ['required_with:admin_load,investigative_load', 'string','size:3'],
103
+                'admin_load'            => ['nullable', 'numeric'],
104
+                'investigative_load'    => ['nullable', 'numeric']
105
+            ]));
106
+            // dd($data);
107
+            if (! $professor->semesters->contains($data['semester_code'])) {
108
+                $professor->semesters()->attach($data['semester_code'], $data);
109
+            } else {
110
+                $professor->semesters()->updateExistingPivot($data['semester_code'], $data);
111
+            }
112
+        }
113
+        return redirect()->back();
114
+    }
115
+
116
+    /**
117
+     * Remove the specified resource from storage.
118
+     *
119
+     * @param  \App\Professor  $professor
120
+     * @return \Illuminate\Http\Response
121
+     */
122
+    public function destroy(Professor $professor)
123
+    {
124
+        //
125
+    }
126
+}

+ 118
- 0
app/Http/Controllers/SectionController.php Voir le fichier

@@ -0,0 +1,118 @@
1
+<?php
2
+
3
+namespace App\Http\Controllers;
4
+
5
+use App\Professor;
6
+use App\Section;
7
+use Illuminate\Http\Request;
8
+use Illuminate\Support\Facades\DB;
9
+use Illuminate\Support\Facades\Log;
10
+
11
+class SectionController extends Controller
12
+{
13
+    /**
14
+     * Display a listing of the resource.
15
+     *
16
+     * @return \Illuminate\Http\Response
17
+     */
18
+    public function index()
19
+    {
20
+        //
21
+    }
22
+
23
+    /**
24
+     * Show the form for creating a new resource.
25
+     *
26
+     * @return \Illuminate\Http\Response
27
+     */
28
+    public function create()
29
+    {
30
+        //
31
+    }
32
+
33
+    /**
34
+     * Store a newly created resource in storage.
35
+     *
36
+     * @param  \Illuminate\Http\Request  $request
37
+     * @return \Illuminate\Http\Response
38
+     */
39
+    public function store(Request $request)
40
+    {
41
+        $request = $request->validate([
42
+            'course_id'     => ['required', 'integer', 'exists:courses,id'],
43
+            'semester_code' => ['required', 'size:3', 'exists:semesters,code'],
44
+            'section_count' => ['required', 'integer', 'max:50'],
45
+        ]);
46
+        for ($i=1; $i <= $request->section_count; $i++) {
47
+            Section::create([
48
+                'course_id'     => $request->course_id,
49
+                'semester_code' => $request->semester_code,
50
+                'code'          => str_pad($i, 3, '0', STR_PAD_LEFT)
51
+            ]);
52
+        }
53
+        return redirect('/course');
54
+    }
55
+
56
+    /**
57
+     * Display the specified resource.
58
+     *
59
+     * @param  \App\Section  $section
60
+     * @return \Illuminate\Http\Response
61
+     */
62
+    public function show(Section $section)
63
+    {
64
+        //
65
+    }
66
+
67
+    /**
68
+     * Show the form for editing the specified resource.
69
+     *
70
+     * @param  \App\Section  $section
71
+     * @return \Illuminate\Http\Response
72
+     */
73
+    public function edit(Section $section)
74
+    {
75
+        //
76
+    }
77
+
78
+    /**
79
+     * Update the specified resource in storage.
80
+     *
81
+     * @param  \Illuminate\Http\Request  $request
82
+     * @param  \App\Section  $section
83
+     * @return \Illuminate\Http\Response
84
+     */
85
+    public function update(Request $request, Section $section)
86
+    {
87
+        // dd($request);
88
+        $data = array_filter($request->validate([
89
+            'code'              => ['nullable', 'size:3', 'string'],
90
+            'professor_id'      => ['nullable', 'array'],
91
+            'professor_id.*'    => ['exists:professors,id'],
92
+            'syllabus'          => ['nullable', 'file', 'mimes:pdf'],
93
+            'credits'           => ['nullable', 'numeric'],
94
+            'student_count'     => ['nullable', 'integer'],
95
+        ]));
96
+        // TODO: Insert syllabus
97
+
98
+        $section->update($data);
99
+        foreach($data['professor_id'] as $professor_id) {
100
+            $section->professors()->attach($professor_id);
101
+        }
102
+        // return 1;
103
+        // return $request;
104
+        // return next($request);
105
+        return redirect()->back();
106
+    }
107
+
108
+    /**
109
+     * Remove the specified resource from storage.
110
+     *
111
+     * @param  \App\Section  $section
112
+     * @return \Illuminate\Http\Response
113
+     */
114
+    public function destroy(Section $section)
115
+    {
116
+        //
117
+    }
118
+}

+ 80
- 0
app/Http/Kernel.php Voir le fichier

@@ -0,0 +1,80 @@
1
+<?php
2
+
3
+namespace App\Http;
4
+
5
+use Illuminate\Foundation\Http\Kernel as HttpKernel;
6
+
7
+class Kernel extends HttpKernel
8
+{
9
+    /**
10
+     * The application's global HTTP middleware stack.
11
+     *
12
+     * These middleware are run during every request to your application.
13
+     *
14
+     * @var array
15
+     */
16
+    protected $middleware = [
17
+        \App\Http\Middleware\CheckForMaintenanceMode::class,
18
+        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
19
+        \App\Http\Middleware\TrimStrings::class,
20
+        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
21
+        \App\Http\Middleware\TrustProxies::class,
22
+    ];
23
+
24
+    /**
25
+     * The application's route middleware groups.
26
+     *
27
+     * @var array
28
+     */
29
+    protected $middlewareGroups = [
30
+        'web' => [
31
+            \App\Http\Middleware\EncryptCookies::class,
32
+            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33
+            \Illuminate\Session\Middleware\StartSession::class,
34
+            // \Illuminate\Session\Middleware\AuthenticateSession::class,
35
+            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
+            \App\Http\Middleware\VerifyCsrfToken::class,
37
+            \Illuminate\Routing\Middleware\SubstituteBindings::class,
38
+        ],
39
+
40
+        'api' => [
41
+            'throttle:60,1',
42
+            'bindings',
43
+        ],
44
+    ];
45
+
46
+    /**
47
+     * The application's route middleware.
48
+     *
49
+     * These middleware may be assigned to groups or used individually.
50
+     *
51
+     * @var array
52
+     */
53
+    protected $routeMiddleware = [
54
+        'auth' => \App\Http\Middleware\Authenticate::class,
55
+        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56
+        'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57
+        'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
58
+        'can' => \Illuminate\Auth\Middleware\Authorize::class,
59
+        'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
60
+        'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
61
+        'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
62
+        'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
63
+    ];
64
+
65
+    /**
66
+     * The priority-sorted list of middleware.
67
+     *
68
+     * This forces non-global middleware to always be in the given order.
69
+     *
70
+     * @var array
71
+     */
72
+    protected $middlewarePriority = [
73
+        \Illuminate\Session\Middleware\StartSession::class,
74
+        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
75
+        \App\Http\Middleware\Authenticate::class,
76
+        \Illuminate\Session\Middleware\AuthenticateSession::class,
77
+        \Illuminate\Routing\Middleware\SubstituteBindings::class,
78
+        \Illuminate\Auth\Middleware\Authorize::class,
79
+    ];
80
+}

+ 21
- 0
app/Http/Middleware/Authenticate.php Voir le fichier

@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Auth\Middleware\Authenticate as Middleware;
6
+
7
+class Authenticate extends Middleware
8
+{
9
+    /**
10
+     * Get the path the user should be redirected to when they are not authenticated.
11
+     *
12
+     * @param  \Illuminate\Http\Request  $request
13
+     * @return string
14
+     */
15
+    protected function redirectTo($request)
16
+    {
17
+        if (! $request->expectsJson()) {
18
+            return route('login');
19
+        }
20
+    }
21
+}

+ 17
- 0
app/Http/Middleware/CheckForMaintenanceMode.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
6
+
7
+class CheckForMaintenanceMode extends Middleware
8
+{
9
+    /**
10
+     * The URIs that should be reachable while maintenance mode is enabled.
11
+     *
12
+     * @var array
13
+     */
14
+    protected $except = [
15
+        //
16
+    ];
17
+}

+ 17
- 0
app/Http/Middleware/EncryptCookies.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
6
+
7
+class EncryptCookies extends Middleware
8
+{
9
+    /**
10
+     * The names of the cookies that should not be encrypted.
11
+     *
12
+     * @var array
13
+     */
14
+    protected $except = [
15
+        //
16
+    ];
17
+}

+ 26
- 0
app/Http/Middleware/RedirectIfAuthenticated.php Voir le fichier

@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Closure;
6
+use Illuminate\Support\Facades\Auth;
7
+
8
+class RedirectIfAuthenticated
9
+{
10
+    /**
11
+     * Handle an incoming request.
12
+     *
13
+     * @param  \Illuminate\Http\Request  $request
14
+     * @param  \Closure  $next
15
+     * @param  string|null  $guard
16
+     * @return mixed
17
+     */
18
+    public function handle($request, Closure $next, $guard = null)
19
+    {
20
+        if (Auth::guard($guard)->check()) {
21
+            return redirect('/dashboard');
22
+        }
23
+
24
+        return $next($request);
25
+    }
26
+}

+ 18
- 0
app/Http/Middleware/TrimStrings.php Voir le fichier

@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
6
+
7
+class TrimStrings extends Middleware
8
+{
9
+    /**
10
+     * The names of the attributes that should not be trimmed.
11
+     *
12
+     * @var array
13
+     */
14
+    protected $except = [
15
+        'password',
16
+        'password_confirmation',
17
+    ];
18
+}

+ 23
- 0
app/Http/Middleware/TrustProxies.php Voir le fichier

@@ -0,0 +1,23 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Http\Request;
6
+use Fideloper\Proxy\TrustProxies as Middleware;
7
+
8
+class TrustProxies extends Middleware
9
+{
10
+    /**
11
+     * The trusted proxies for this application.
12
+     *
13
+     * @var array|string
14
+     */
15
+    protected $proxies;
16
+
17
+    /**
18
+     * The headers that should be used to detect proxies.
19
+     *
20
+     * @var int
21
+     */
22
+    protected $headers = Request::HEADER_X_FORWARDED_ALL;
23
+}

+ 24
- 0
app/Http/Middleware/VerifyCsrfToken.php Voir le fichier

@@ -0,0 +1,24 @@
1
+<?php
2
+
3
+namespace App\Http\Middleware;
4
+
5
+use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
6
+
7
+class VerifyCsrfToken extends Middleware
8
+{
9
+    /**
10
+     * Indicates whether the XSRF-TOKEN cookie should be set on the response.
11
+     *
12
+     * @var bool
13
+     */
14
+    protected $addHttpCookie = true;
15
+
16
+    /**
17
+     * The URIs that should be excluded from CSRF verification.
18
+     *
19
+     * @var array
20
+     */
21
+    protected $except = [
22
+        //
23
+    ];
24
+}

+ 44
- 0
app/Professor.php Voir le fichier

@@ -0,0 +1,44 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Database\Eloquent\Model;
6
+
7
+class Professor extends Model
8
+{
9
+    public $timestamps = false;
10
+
11
+    protected $fillable = [
12
+        'num_prof',
13
+        'first_name',
14
+        'last_name',
15
+        'email',
16
+        'type',
17
+        'dept_id'
18
+    ];
19
+
20
+
21
+    public function sections() {
22
+        return $this->belongsToMany(Section::class)->withPivot('percent', 'schedule', 'eval');
23
+    }
24
+
25
+    public function semesters() {
26
+        return $this->belongsToMany(Semester::class)->withPivot('admin_load', 'investigative_load');
27
+    }
28
+
29
+    public function getFullNameAttribute() {
30
+        return "{$this->first_name} {$this->last_name}";
31
+    }
32
+
33
+    // public function getSectionLoad(Section $section) {
34
+        // return ($section->pivot->percent ?? 1.0) * (($section->credits ?? 0.0) + calcExtraCredits($section->credits, $section->student_count));
35
+    // }
36
+
37
+    public function getAcademicLoad(Semester $semester) {
38
+        $prof_sections = $this->sections->where('semester_code', '=', $semester->code);
39
+        return $prof_sections->reduce(function ($carry, $section) {
40
+            return $carry + ($section->pivot->percent ?? 1.0) * (($section->credits ?? 0.0) + $section->extra_credits);
41
+        }, 0);
42
+    }
43
+
44
+}

+ 30
- 0
app/Providers/AppServiceProvider.php Voir le fichier

@@ -0,0 +1,30 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Illuminate\Support\ServiceProvider;
6
+
7
+class AppServiceProvider extends ServiceProvider
8
+{
9
+    /**
10
+     * Register any application services.
11
+     *
12
+     * @return void
13
+     */
14
+    public function register()
15
+    {
16
+        if (app()->isLocal()) {
17
+            app()->register(TelescopeServiceProvider::class);
18
+        }
19
+    }
20
+
21
+    /**
22
+     * Bootstrap any application services.
23
+     *
24
+     * @return void
25
+     */
26
+    public function boot()
27
+    {
28
+        //
29
+    }
30
+}

+ 30
- 0
app/Providers/AuthServiceProvider.php Voir le fichier

@@ -0,0 +1,30 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Illuminate\Support\Facades\Gate;
6
+use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
7
+
8
+class AuthServiceProvider extends ServiceProvider
9
+{
10
+    /**
11
+     * The policy mappings for the application.
12
+     *
13
+     * @var array
14
+     */
15
+    protected $policies = [
16
+        // 'App\Model' => 'App\Policies\ModelPolicy',
17
+    ];
18
+
19
+    /**
20
+     * Register any authentication / authorization services.
21
+     *
22
+     * @return void
23
+     */
24
+    public function boot()
25
+    {
26
+        $this->registerPolicies();
27
+
28
+        //
29
+    }
30
+}

+ 21
- 0
app/Providers/BroadcastServiceProvider.php Voir le fichier

@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Illuminate\Support\ServiceProvider;
6
+use Illuminate\Support\Facades\Broadcast;
7
+
8
+class BroadcastServiceProvider extends ServiceProvider
9
+{
10
+    /**
11
+     * Bootstrap any application services.
12
+     *
13
+     * @return void
14
+     */
15
+    public function boot()
16
+    {
17
+        Broadcast::routes();
18
+
19
+        require base_path('routes/channels.php');
20
+    }
21
+}

+ 34
- 0
app/Providers/EventServiceProvider.php Voir le fichier

@@ -0,0 +1,34 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Illuminate\Support\Facades\Event;
6
+use Illuminate\Auth\Events\Registered;
7
+use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
8
+use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
9
+
10
+class EventServiceProvider extends ServiceProvider
11
+{
12
+    /**
13
+     * The event listener mappings for the application.
14
+     *
15
+     * @var array
16
+     */
17
+    protected $listen = [
18
+        Registered::class => [
19
+            SendEmailVerificationNotification::class,
20
+        ],
21
+    ];
22
+
23
+    /**
24
+     * Register any events for your application.
25
+     *
26
+     * @return void
27
+     */
28
+    public function boot()
29
+    {
30
+        parent::boot();
31
+
32
+        //
33
+    }
34
+}

+ 73
- 0
app/Providers/RouteServiceProvider.php Voir le fichier

@@ -0,0 +1,73 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Illuminate\Support\Facades\Route;
6
+use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
7
+
8
+class RouteServiceProvider extends ServiceProvider
9
+{
10
+    /**
11
+     * This namespace is applied to your controller routes.
12
+     *
13
+     * In addition, it is set as the URL generator's root namespace.
14
+     *
15
+     * @var string
16
+     */
17
+    protected $namespace = 'App\Http\Controllers';
18
+
19
+    /**
20
+     * Define your route model bindings, pattern filters, etc.
21
+     *
22
+     * @return void
23
+     */
24
+    public function boot()
25
+    {
26
+        //
27
+
28
+        parent::boot();
29
+    }
30
+
31
+    /**
32
+     * Define the routes for the application.
33
+     *
34
+     * @return void
35
+     */
36
+    public function map()
37
+    {
38
+        $this->mapApiRoutes();
39
+
40
+        $this->mapWebRoutes();
41
+
42
+        //
43
+    }
44
+
45
+    /**
46
+     * Define the "web" routes for the application.
47
+     *
48
+     * These routes all receive session state, CSRF protection, etc.
49
+     *
50
+     * @return void
51
+     */
52
+    protected function mapWebRoutes()
53
+    {
54
+        Route::middleware('web')
55
+             ->namespace($this->namespace)
56
+             ->group(base_path('routes/web.php'));
57
+    }
58
+
59
+    /**
60
+     * Define the "api" routes for the application.
61
+     *
62
+     * These routes are typically stateless.
63
+     *
64
+     * @return void
65
+     */
66
+    protected function mapApiRoutes()
67
+    {
68
+        Route::prefix('api')
69
+             ->middleware('api')
70
+             ->namespace($this->namespace)
71
+             ->group(base_path('routes/api.php'));
72
+    }
73
+}

+ 70
- 0
app/Providers/TelescopeServiceProvider.php Voir le fichier

@@ -0,0 +1,70 @@
1
+<?php
2
+
3
+namespace App\Providers;
4
+
5
+use Laravel\Telescope\Telescope;
6
+use Illuminate\Support\Facades\Gate;
7
+use Laravel\Telescope\IncomingEntry;
8
+use Laravel\Telescope\TelescopeApplicationServiceProvider;
9
+
10
+class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
11
+{
12
+    /**
13
+     * Register any application services.
14
+     *
15
+     * @return void
16
+     */
17
+    public function register()
18
+    {
19
+        // Telescope::night();
20
+
21
+        // $this->hideSensitiveRequestDetails();
22
+
23
+        Telescope::filter(function (IncomingEntry $entry) {
24
+            if ($this->app->isLocal()) {
25
+                return true;
26
+            }
27
+
28
+            return $entry->isReportableException() ||
29
+                   $entry->isFailedJob() ||
30
+                   $entry->isScheduledTask() ||
31
+                   $entry->hasMonitoredTag();
32
+        });
33
+    }
34
+
35
+    /**
36
+     * Prevent sensitive request details from being logged by Telescope.
37
+     *
38
+     * @return void
39
+     */
40
+    protected function hideSensitiveRequestDetails()
41
+    {
42
+        if ($this->app->isLocal()) {
43
+            return;
44
+        }
45
+
46
+        Telescope::hideRequestParameters(['_token']);
47
+
48
+        Telescope::hideRequestHeaders([
49
+            'cookie',
50
+            'x-csrf-token',
51
+            'x-xsrf-token',
52
+        ]);
53
+    }
54
+
55
+    /**
56
+     * Register the Telescope gate.
57
+     *
58
+     * This gate determines who can access Telescope in non-local environments.
59
+     *
60
+     * @return void
61
+     */
62
+    protected function gate()
63
+    {
64
+        // Gate::define('viewTelescope', function ($user) {
65
+        //     return in_array($user->email, [
66
+        //         //
67
+        //     ]);
68
+        // });
69
+    }
70
+}

+ 37
- 0
app/Section.php Voir le fichier

@@ -0,0 +1,37 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Database\Eloquent\Model;
6
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
7
+
8
+class Section extends Model
9
+{
10
+
11
+    protected $fillable = [
12
+        'course_id',
13
+        'semester_code',
14
+        'code',
15
+        'credits',
16
+        'student_count',
17
+        'syllabus'
18
+    ];
19
+
20
+    public $timestamps = false;
21
+
22
+    public function semester() {
23
+        return $this->belongsTo(Semester::class);
24
+    }
25
+
26
+    public function course() {
27
+        return $this->belongsTo(Course::class);
28
+    }
29
+
30
+    public function professors() {
31
+        return $this->belongsToMany(Professor::class);
32
+    }
33
+
34
+    public function getExtraCreditsAttribute() {
35
+        return calcExtraCredits($this->credits, $this->student_count);
36
+    }
37
+}

+ 33
- 0
app/Semester.php Voir le fichier

@@ -0,0 +1,33 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Database\Eloquent\Model;
6
+
7
+class Semester extends Model
8
+{
9
+    public $primaryKey = 'code';
10
+    public $incrementing = false;
11
+    public $timestamps = false;
12
+
13
+    protected $keyType = 'string';
14
+
15
+
16
+    public function courses() {
17
+        return $this->belongsToMany(Course::class, 'sections');
18
+    }
19
+
20
+    public function sections() {
21
+        return $this->hasMany(Section::class);
22
+    }
23
+
24
+    public function professors() {
25
+        return $this->belongsToMany(Professor::class)->withPivot('admin_load', 'investigative_load');
26
+    }
27
+
28
+    public function getIsFutureAttribute() {
29
+        return Semester::orderBy('code', 'desc')->take(6)->get()->contains('code', $this->code);
30
+    }
31
+
32
+
33
+}

+ 39
- 0
app/User.php Voir le fichier

@@ -0,0 +1,39 @@
1
+<?php
2
+
3
+namespace App;
4
+
5
+use Illuminate\Notifications\Notifiable;
6
+use Illuminate\Contracts\Auth\MustVerifyEmail;
7
+use Illuminate\Foundation\Auth\User as Authenticatable;
8
+
9
+class User extends Authenticatable
10
+{
11
+    use Notifiable;
12
+
13
+    /**
14
+     * The attributes that are mass assignable.
15
+     *
16
+     * @var array
17
+     */
18
+    protected $fillable = [
19
+        'name', 'email', 'password',
20
+    ];
21
+
22
+    /**
23
+     * The attributes that should be hidden for arrays.
24
+     *
25
+     * @var array
26
+     */
27
+    protected $hidden = [
28
+        'password', 'remember_token',
29
+    ];
30
+
31
+    /**
32
+     * The attributes that should be cast to native types.
33
+     *
34
+     * @var array
35
+     */
36
+    protected $casts = [
37
+        'email_verified_at' => 'datetime',
38
+    ];
39
+}

+ 53
- 0
artisan Voir le fichier

@@ -0,0 +1,53 @@
1
+#!/usr/bin/env php
2
+<?php
3
+
4
+define('LARAVEL_START', microtime(true));
5
+
6
+/*
7
+|--------------------------------------------------------------------------
8
+| Register The Auto Loader
9
+|--------------------------------------------------------------------------
10
+|
11
+| Composer provides a convenient, automatically generated class loader
12
+| for our application. We just need to utilize it! We'll require it
13
+| into the script here so that we do not have to worry about the
14
+| loading of any our classes "manually". Feels great to relax.
15
+|
16
+*/
17
+
18
+require __DIR__.'/vendor/autoload.php';
19
+
20
+$app = require_once __DIR__.'/bootstrap/app.php';
21
+
22
+/*
23
+|--------------------------------------------------------------------------
24
+| Run The Artisan Application
25
+|--------------------------------------------------------------------------
26
+|
27
+| When we run the console application, the current CLI command will be
28
+| executed in this console and the response sent back to a terminal
29
+| or another output device for the developers. Here goes nothing!
30
+|
31
+*/
32
+
33
+$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
34
+
35
+$status = $kernel->handle(
36
+    $input = new Symfony\Component\Console\Input\ArgvInput,
37
+    new Symfony\Component\Console\Output\ConsoleOutput
38
+);
39
+
40
+/*
41
+|--------------------------------------------------------------------------
42
+| Shutdown The Application
43
+|--------------------------------------------------------------------------
44
+|
45
+| Once Artisan has finished running, we will fire off the shutdown events
46
+| so that any final work may be done by the application before we shut
47
+| down the process. This is the last thing to happen to the request.
48
+|
49
+*/
50
+
51
+$kernel->terminate($input, $status);
52
+
53
+exit($status);

+ 55
- 0
bootstrap/app.php Voir le fichier

@@ -0,0 +1,55 @@
1
+<?php
2
+
3
+/*
4
+|--------------------------------------------------------------------------
5
+| Create The Application
6
+|--------------------------------------------------------------------------
7
+|
8
+| The first thing we will do is create a new Laravel application instance
9
+| which serves as the "glue" for all the components of Laravel, and is
10
+| the IoC container for the system binding all of the various parts.
11
+|
12
+*/
13
+
14
+$app = new Illuminate\Foundation\Application(
15
+    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
16
+);
17
+
18
+/*
19
+|--------------------------------------------------------------------------
20
+| Bind Important Interfaces
21
+|--------------------------------------------------------------------------
22
+|
23
+| Next, we need to bind some important interfaces into the container so
24
+| we will be able to resolve them when needed. The kernels serve the
25
+| incoming requests to this application from both the web and CLI.
26
+|
27
+*/
28
+
29
+$app->singleton(
30
+    Illuminate\Contracts\Http\Kernel::class,
31
+    App\Http\Kernel::class
32
+);
33
+
34
+$app->singleton(
35
+    Illuminate\Contracts\Console\Kernel::class,
36
+    App\Console\Kernel::class
37
+);
38
+
39
+$app->singleton(
40
+    Illuminate\Contracts\Debug\ExceptionHandler::class,
41
+    App\Exceptions\Handler::class
42
+);
43
+
44
+/*
45
+|--------------------------------------------------------------------------
46
+| Return The Application
47
+|--------------------------------------------------------------------------
48
+|
49
+| This script returns the application instance. The instance is given to
50
+| the calling script so we can separate the building of the instances
51
+| from the actual running of the application and sending responses.
52
+|
53
+*/
54
+
55
+return $app;

+ 2
- 0
bootstrap/cache/.gitignore Voir le fichier

@@ -0,0 +1,2 @@
1
+*
2
+!.gitignore

+ 67
- 0
composer.json Voir le fichier

@@ -0,0 +1,67 @@
1
+{
2
+    "name": "laravel/laravel",
3
+    "type": "project",
4
+    "description": "The Laravel Framework.",
5
+    "keywords": [
6
+        "framework",
7
+        "laravel"
8
+    ],
9
+    "license": "MIT",
10
+    "require": {
11
+        "php": "^7.1.3",
12
+        "fideloper/proxy": "^4.0",
13
+        "laravel/framework": "5.8.*",
14
+        "laravel/socialite": "^3.2.0",
15
+        "laravel/tinker": "^1.0"
16
+    },
17
+    "require-dev": {
18
+        "beyondcode/laravel-dump-server": "^1.0",
19
+        "filp/whoops": "^2.0",
20
+        "fzaninotto/faker": "^1.4",
21
+        "laravel/telescope": "^2.0",
22
+        "mockery/mockery": "^1.0",
23
+        "nunomaduro/collision": "^3.0",
24
+        "phpunit/phpunit": "^7.5"
25
+    },
26
+    "config": {
27
+        "optimize-autoloader": true,
28
+        "preferred-install": "dist",
29
+        "sort-packages": true
30
+    },
31
+    "extra": {
32
+        "laravel": {
33
+            "dont-discover": []
34
+        }
35
+    },
36
+    "autoload": {
37
+        "files": [
38
+            "app/Helpers/Helper.php"
39
+        ],
40
+        "psr-4": {
41
+            "App\\": "app/"
42
+        },
43
+        "classmap": [
44
+            "database/seeds",
45
+            "database/factories"
46
+        ]
47
+    },
48
+    "autoload-dev": {
49
+        "psr-4": {
50
+            "Tests\\": "tests/"
51
+        }
52
+    },
53
+    "minimum-stability": "dev",
54
+    "prefer-stable": true,
55
+    "scripts": {
56
+        "post-autoload-dump": [
57
+            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
58
+            "@php artisan package:discover --ansi"
59
+        ],
60
+        "post-root-package-install": [
61
+            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
62
+        ],
63
+        "post-create-project-cmd": [
64
+            "@php artisan key:generate --ansi"
65
+        ]
66
+    }
67
+}

+ 5167
- 0
composer.lock
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 234
- 0
config/app.php Voir le fichier

@@ -0,0 +1,234 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Application Name
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | This value is the name of your application. This value is used when the
11
+    | framework needs to place the application's name in a notification or
12
+    | any other location as required by the application or its packages.
13
+    |
14
+    */
15
+
16
+    'name' => env('APP_NAME', 'Laravel'),
17
+
18
+    /*
19
+    |--------------------------------------------------------------------------
20
+    | Application Environment
21
+    |--------------------------------------------------------------------------
22
+    |
23
+    | This value determines the "environment" your application is currently
24
+    | running in. This may determine how you prefer to configure various
25
+    | services the application utilizes. Set this in your ".env" file.
26
+    |
27
+    */
28
+
29
+    'env' => env('APP_ENV', 'production'),
30
+
31
+    /*
32
+    |--------------------------------------------------------------------------
33
+    | Application Debug Mode
34
+    |--------------------------------------------------------------------------
35
+    |
36
+    | When your application is in debug mode, detailed error messages with
37
+    | stack traces will be shown on every error that occurs within your
38
+    | application. If disabled, a simple generic error page is shown.
39
+    |
40
+    */
41
+
42
+    'debug' => env('APP_DEBUG', false),
43
+
44
+    /*
45
+    |--------------------------------------------------------------------------
46
+    | Application URL
47
+    |--------------------------------------------------------------------------
48
+    |
49
+    | This URL is used by the console to properly generate URLs when using
50
+    | the Artisan command line tool. You should set this to the root of
51
+    | your application so that it is used when running Artisan tasks.
52
+    |
53
+    */
54
+
55
+    'url' => env('APP_URL', 'http://localhost'),
56
+
57
+    'asset_url' => env('ASSET_URL', null),
58
+
59
+    /*
60
+    |--------------------------------------------------------------------------
61
+    | Application Timezone
62
+    |--------------------------------------------------------------------------
63
+    |
64
+    | Here you may specify the default timezone for your application, which
65
+    | will be used by the PHP date and date-time functions. We have gone
66
+    | ahead and set this to a sensible default for you out of the box.
67
+    |
68
+    */
69
+
70
+    'timezone' => 'UTC',
71
+
72
+    /*
73
+    |--------------------------------------------------------------------------
74
+    | Application Locale Configuration
75
+    |--------------------------------------------------------------------------
76
+    |
77
+    | The application locale determines the default locale that will be used
78
+    | by the translation service provider. You are free to set this value
79
+    | to any of the locales which will be supported by the application.
80
+    |
81
+    */
82
+
83
+    'locale' => 'en',
84
+
85
+    /*
86
+    |--------------------------------------------------------------------------
87
+    | Application Fallback Locale
88
+    |--------------------------------------------------------------------------
89
+    |
90
+    | The fallback locale determines the locale to use when the current one
91
+    | is not available. You may change the value to correspond to any of
92
+    | the language folders that are provided through your application.
93
+    |
94
+    */
95
+
96
+    'fallback_locale' => 'en',
97
+
98
+    /*
99
+    |--------------------------------------------------------------------------
100
+    | Faker Locale
101
+    |--------------------------------------------------------------------------
102
+    |
103
+    | This locale will be used by the Faker PHP library when generating fake
104
+    | data for your database seeds. For example, this will be used to get
105
+    | localized telephone numbers, street address information and more.
106
+    |
107
+    */
108
+
109
+    'faker_locale' => 'en_US',
110
+
111
+    /*
112
+    |--------------------------------------------------------------------------
113
+    | Encryption Key
114
+    |--------------------------------------------------------------------------
115
+    |
116
+    | This key is used by the Illuminate encrypter service and should be set
117
+    | to a random, 32 character string, otherwise these encrypted strings
118
+    | will not be safe. Please do this before deploying an application!
119
+    |
120
+    */
121
+
122
+    'key' => env('APP_KEY'),
123
+
124
+    'cipher' => 'AES-256-CBC',
125
+
126
+    /*
127
+    |--------------------------------------------------------------------------
128
+    | Autoloaded Service Providers
129
+    |--------------------------------------------------------------------------
130
+    |
131
+    | The service providers listed here will be automatically loaded on the
132
+    | request to your application. Feel free to add your own services to
133
+    | this array to grant expanded functionality to your applications.
134
+    |
135
+    */
136
+
137
+    'providers' => [
138
+
139
+        /*
140
+         * Laravel Framework Service Providers...
141
+         */
142
+        Illuminate\Auth\AuthServiceProvider::class,
143
+        Illuminate\Broadcasting\BroadcastServiceProvider::class,
144
+        Illuminate\Bus\BusServiceProvider::class,
145
+        Illuminate\Cache\CacheServiceProvider::class,
146
+        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
147
+        Illuminate\Cookie\CookieServiceProvider::class,
148
+        Illuminate\Database\DatabaseServiceProvider::class,
149
+        Illuminate\Encryption\EncryptionServiceProvider::class,
150
+        Illuminate\Filesystem\FilesystemServiceProvider::class,
151
+        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
152
+        Illuminate\Hashing\HashServiceProvider::class,
153
+        Illuminate\Mail\MailServiceProvider::class,
154
+        Illuminate\Notifications\NotificationServiceProvider::class,
155
+        Illuminate\Pagination\PaginationServiceProvider::class,
156
+        Illuminate\Pipeline\PipelineServiceProvider::class,
157
+        Illuminate\Queue\QueueServiceProvider::class,
158
+        Illuminate\Redis\RedisServiceProvider::class,
159
+        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
160
+        Illuminate\Session\SessionServiceProvider::class,
161
+        Illuminate\Translation\TranslationServiceProvider::class,
162
+        Illuminate\Validation\ValidationServiceProvider::class,
163
+        Illuminate\View\ViewServiceProvider::class,
164
+
165
+        /*
166
+         * Package Service Providers...
167
+         */
168
+        Laravel\Socialite\SocialiteServiceProvider::class,
169
+
170
+        /*
171
+         * Application Service Providers...
172
+         */
173
+        App\Providers\AppServiceProvider::class,
174
+        App\Providers\AuthServiceProvider::class,
175
+        // App\Providers\BroadcastServiceProvider::class,
176
+        App\Providers\EventServiceProvider::class,
177
+        // App\Providers\TelescopeServiceProvider::class,
178
+        App\Providers\RouteServiceProvider::class,
179
+
180
+    ],
181
+
182
+    /*
183
+    |--------------------------------------------------------------------------
184
+    | Class Aliases
185
+    |--------------------------------------------------------------------------
186
+    |
187
+    | This array of class aliases will be registered when this application
188
+    | is started. However, feel free to register as many as you wish as
189
+    | the aliases are "lazy" loaded so they don't hinder performance.
190
+    |
191
+    */
192
+
193
+    'aliases' => [
194
+
195
+        'App' => Illuminate\Support\Facades\App::class,
196
+        'Arr' => Illuminate\Support\Arr::class,
197
+        'Artisan' => Illuminate\Support\Facades\Artisan::class,
198
+        'Auth' => Illuminate\Support\Facades\Auth::class,
199
+        'Blade' => Illuminate\Support\Facades\Blade::class,
200
+        'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
201
+        'Bus' => Illuminate\Support\Facades\Bus::class,
202
+        'Cache' => Illuminate\Support\Facades\Cache::class,
203
+        'Config' => Illuminate\Support\Facades\Config::class,
204
+        'Cookie' => Illuminate\Support\Facades\Cookie::class,
205
+        'Crypt' => Illuminate\Support\Facades\Crypt::class,
206
+        'DB' => Illuminate\Support\Facades\DB::class,
207
+        'Eloquent' => Illuminate\Database\Eloquent\Model::class,
208
+        'Event' => Illuminate\Support\Facades\Event::class,
209
+        'File' => Illuminate\Support\Facades\File::class,
210
+        'Gate' => Illuminate\Support\Facades\Gate::class,
211
+        'Hash' => Illuminate\Support\Facades\Hash::class,
212
+        'Lang' => Illuminate\Support\Facades\Lang::class,
213
+        'Log' => Illuminate\Support\Facades\Log::class,
214
+        'Mail' => Illuminate\Support\Facades\Mail::class,
215
+        'Notification' => Illuminate\Support\Facades\Notification::class,
216
+        'Password' => Illuminate\Support\Facades\Password::class,
217
+        'Queue' => Illuminate\Support\Facades\Queue::class,
218
+        'Redirect' => Illuminate\Support\Facades\Redirect::class,
219
+        'Redis' => Illuminate\Support\Facades\Redis::class,
220
+        'Request' => Illuminate\Support\Facades\Request::class,
221
+        'Response' => Illuminate\Support\Facades\Response::class,
222
+        'Route' => Illuminate\Support\Facades\Route::class,
223
+        'Schema' => Illuminate\Support\Facades\Schema::class,
224
+        'Session' => Illuminate\Support\Facades\Session::class,
225
+        'Socialite' => Laravel\Socialite\Facades\Socialite::class,
226
+        'Storage' => Illuminate\Support\Facades\Storage::class,
227
+        'Str' => Illuminate\Support\Str::class,
228
+        'URL' => Illuminate\Support\Facades\URL::class,
229
+        'Validator' => Illuminate\Support\Facades\Validator::class,
230
+        'View' => Illuminate\Support\Facades\View::class,
231
+
232
+    ],
233
+
234
+];

+ 103
- 0
config/auth.php Voir le fichier

@@ -0,0 +1,103 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Authentication Defaults
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | This option controls the default authentication "guard" and password
11
+    | reset options for your application. You may change these defaults
12
+    | as required, but they're a perfect start for most applications.
13
+    |
14
+    */
15
+
16
+    'defaults' => [
17
+        'guard' => 'web',
18
+        'passwords' => 'users',
19
+    ],
20
+
21
+    /*
22
+    |--------------------------------------------------------------------------
23
+    | Authentication Guards
24
+    |--------------------------------------------------------------------------
25
+    |
26
+    | Next, you may define every authentication guard for your application.
27
+    | Of course, a great default configuration has been defined for you
28
+    | here which uses session storage and the Eloquent user provider.
29
+    |
30
+    | All authentication drivers have a user provider. This defines how the
31
+    | users are actually retrieved out of your database or other storage
32
+    | mechanisms used by this application to persist your user's data.
33
+    |
34
+    | Supported: "session", "token"
35
+    |
36
+    */
37
+
38
+    'guards' => [
39
+        'web' => [
40
+            'driver' => 'session',
41
+            'provider' => 'users',
42
+        ],
43
+
44
+        'api' => [
45
+            'driver' => 'token',
46
+            'provider' => 'users',
47
+            'hash' => false,
48
+        ],
49
+    ],
50
+
51
+    /*
52
+    |--------------------------------------------------------------------------
53
+    | User Providers
54
+    |--------------------------------------------------------------------------
55
+    |
56
+    | All authentication drivers have a user provider. This defines how the
57
+    | users are actually retrieved out of your database or other storage
58
+    | mechanisms used by this application to persist your user's data.
59
+    |
60
+    | If you have multiple user tables or models you may configure multiple
61
+    | sources which represent each model / table. These sources may then
62
+    | be assigned to any extra authentication guards you have defined.
63
+    |
64
+    | Supported: "database", "eloquent"
65
+    |
66
+    */
67
+
68
+    'providers' => [
69
+        'users' => [
70
+            'driver' => 'eloquent',
71
+            'model' => App\User::class,
72
+        ],
73
+
74
+        // 'users' => [
75
+        //     'driver' => 'database',
76
+        //     'table' => 'users',
77
+        // ],
78
+    ],
79
+
80
+    /*
81
+    |--------------------------------------------------------------------------
82
+    | Resetting Passwords
83
+    |--------------------------------------------------------------------------
84
+    |
85
+    | You may specify multiple password reset configurations if you have more
86
+    | than one user table or model in the application and you want to have
87
+    | separate password reset settings based on the specific user types.
88
+    |
89
+    | The expire time is the number of minutes that the reset token should be
90
+    | considered valid. This security feature keeps tokens short-lived so
91
+    | they have less time to be guessed. You may change this as needed.
92
+    |
93
+    */
94
+
95
+    'passwords' => [
96
+        'users' => [
97
+            'provider' => 'users',
98
+            'table' => 'password_resets',
99
+            'expire' => 60,
100
+        ],
101
+    ],
102
+
103
+];

+ 59
- 0
config/broadcasting.php Voir le fichier

@@ -0,0 +1,59 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Default Broadcaster
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | This option controls the default broadcaster that will be used by the
11
+    | framework when an event needs to be broadcast. You may set this to
12
+    | any of the connections defined in the "connections" array below.
13
+    |
14
+    | Supported: "pusher", "redis", "log", "null"
15
+    |
16
+    */
17
+
18
+    'default' => env('BROADCAST_DRIVER', 'null'),
19
+
20
+    /*
21
+    |--------------------------------------------------------------------------
22
+    | Broadcast Connections
23
+    |--------------------------------------------------------------------------
24
+    |
25
+    | Here you may define all of the broadcast connections that will be used
26
+    | to broadcast events to other systems or over websockets. Samples of
27
+    | each available type of connection are provided inside this array.
28
+    |
29
+    */
30
+
31
+    'connections' => [
32
+
33
+        'pusher' => [
34
+            'driver' => 'pusher',
35
+            'key' => env('PUSHER_APP_KEY'),
36
+            'secret' => env('PUSHER_APP_SECRET'),
37
+            'app_id' => env('PUSHER_APP_ID'),
38
+            'options' => [
39
+                'cluster' => env('PUSHER_APP_CLUSTER'),
40
+                'encrypted' => true,
41
+            ],
42
+        ],
43
+
44
+        'redis' => [
45
+            'driver' => 'redis',
46
+            'connection' => 'default',
47
+        ],
48
+
49
+        'log' => [
50
+            'driver' => 'log',
51
+        ],
52
+
53
+        'null' => [
54
+            'driver' => 'null',
55
+        ],
56
+
57
+    ],
58
+
59
+];

+ 103
- 0
config/cache.php Voir le fichier

@@ -0,0 +1,103 @@
1
+<?php
2
+
3
+use Illuminate\Support\Str;
4
+
5
+return [
6
+
7
+    /*
8
+    |--------------------------------------------------------------------------
9
+    | Default Cache Store
10
+    |--------------------------------------------------------------------------
11
+    |
12
+    | This option controls the default cache connection that gets used while
13
+    | using this caching library. This connection is used when another is
14
+    | not explicitly specified when executing a given caching function.
15
+    |
16
+    | Supported: "apc", "array", "database", "file",
17
+    |            "memcached", "redis", "dynamodb"
18
+    |
19
+    */
20
+
21
+    'default' => env('CACHE_DRIVER', 'file'),
22
+
23
+    /*
24
+    |--------------------------------------------------------------------------
25
+    | Cache Stores
26
+    |--------------------------------------------------------------------------
27
+    |
28
+    | Here you may define all of the cache "stores" for your application as
29
+    | well as their drivers. You may even define multiple stores for the
30
+    | same cache driver to group types of items stored in your caches.
31
+    |
32
+    */
33
+
34
+    'stores' => [
35
+
36
+        'apc' => [
37
+            'driver' => 'apc',
38
+        ],
39
+
40
+        'array' => [
41
+            'driver' => 'array',
42
+        ],
43
+
44
+        'database' => [
45
+            'driver' => 'database',
46
+            'table' => 'cache',
47
+            'connection' => null,
48
+        ],
49
+
50
+        'file' => [
51
+            'driver' => 'file',
52
+            'path' => storage_path('framework/cache/data'),
53
+        ],
54
+
55
+        'memcached' => [
56
+            'driver' => 'memcached',
57
+            'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
58
+            'sasl' => [
59
+                env('MEMCACHED_USERNAME'),
60
+                env('MEMCACHED_PASSWORD'),
61
+            ],
62
+            'options' => [
63
+                // Memcached::OPT_CONNECT_TIMEOUT => 2000,
64
+            ],
65
+            'servers' => [
66
+                [
67
+                    'host' => env('MEMCACHED_HOST', '127.0.0.1'),
68
+                    'port' => env('MEMCACHED_PORT', 11211),
69
+                    'weight' => 100,
70
+                ],
71
+            ],
72
+        ],
73
+
74
+        'redis' => [
75
+            'driver' => 'redis',
76
+            'connection' => 'cache',
77
+        ],
78
+
79
+        'dynamodb' => [
80
+            'driver' => 'dynamodb',
81
+            'key' => env('AWS_ACCESS_KEY_ID'),
82
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
83
+            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
84
+            'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
85
+            'endpoint' => env('DYNAMODB_ENDPOINT'),
86
+        ],
87
+
88
+    ],
89
+
90
+    /*
91
+    |--------------------------------------------------------------------------
92
+    | Cache Key Prefix
93
+    |--------------------------------------------------------------------------
94
+    |
95
+    | When utilizing a RAM based store such as APC or Memcached, there might
96
+    | be other applications utilizing the same cache. So, we'll specify a
97
+    | value to get prefixed to all our keys so we can avoid collisions.
98
+    |
99
+    */
100
+
101
+    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
102
+
103
+];

+ 147
- 0
config/database.php Voir le fichier

@@ -0,0 +1,147 @@
1
+<?php
2
+
3
+use Illuminate\Support\Str;
4
+
5
+return [
6
+
7
+    /*
8
+    |--------------------------------------------------------------------------
9
+    | Default Database Connection Name
10
+    |--------------------------------------------------------------------------
11
+    |
12
+    | Here you may specify which of the database connections below you wish
13
+    | to use as your default connection for all database work. Of course
14
+    | you may use many connections at once using the Database library.
15
+    |
16
+    */
17
+
18
+    'default' => env('DB_CONNECTION', 'mysql'),
19
+
20
+    /*
21
+    |--------------------------------------------------------------------------
22
+    | Database Connections
23
+    |--------------------------------------------------------------------------
24
+    |
25
+    | Here are each of the database connections setup for your application.
26
+    | Of course, examples of configuring each database platform that is
27
+    | supported by Laravel is shown below to make development simple.
28
+    |
29
+    |
30
+    | All database work in Laravel is done through the PHP PDO facilities
31
+    | so make sure you have the driver for your particular database of
32
+    | choice installed on your machine before you begin development.
33
+    |
34
+    */
35
+
36
+    'connections' => [
37
+
38
+        'sqlite' => [
39
+            'driver' => 'sqlite',
40
+            'url' => env('DATABASE_URL'),
41
+            'database' => env('DB_DATABASE', database_path('database.sqlite')),
42
+            'prefix' => '',
43
+            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44
+        ],
45
+
46
+        'mysql' => [
47
+            'driver' => 'mysql',
48
+            'url' => env('DATABASE_URL'),
49
+            'host' => env('DB_HOST', '127.0.0.1'),
50
+            'port' => env('DB_PORT', '3306'),
51
+            'database' => env('DB_DATABASE', 'forge'),
52
+            'username' => env('DB_USERNAME', 'forge'),
53
+            'password' => env('DB_PASSWORD', ''),
54
+            'unix_socket' => env('DB_SOCKET', ''),
55
+            'charset' => 'utf8mb4',
56
+            'collation' => 'utf8mb4_unicode_ci',
57
+            'prefix' => '',
58
+            'prefix_indexes' => true,
59
+            'strict' => true,
60
+            'engine' => null,
61
+            'options' => extension_loaded('pdo_mysql') ? array_filter([
62
+                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
63
+            ]) : [],
64
+        ],
65
+
66
+        'pgsql' => [
67
+            'driver' => 'pgsql',
68
+            'url' => env('DATABASE_URL'),
69
+            'host' => env('DB_HOST', '127.0.0.1'),
70
+            'port' => env('DB_PORT', '5432'),
71
+            'database' => env('DB_DATABASE', 'forge'),
72
+            'username' => env('DB_USERNAME', 'forge'),
73
+            'password' => env('DB_PASSWORD', ''),
74
+            'charset' => 'utf8',
75
+            'prefix' => '',
76
+            'prefix_indexes' => true,
77
+            'schema' => 'public',
78
+            'sslmode' => 'prefer',
79
+        ],
80
+
81
+        'sqlsrv' => [
82
+            'driver' => 'sqlsrv',
83
+            'url' => env('DATABASE_URL'),
84
+            'host' => env('DB_HOST', 'localhost'),
85
+            'port' => env('DB_PORT', '1433'),
86
+            'database' => env('DB_DATABASE', 'forge'),
87
+            'username' => env('DB_USERNAME', 'forge'),
88
+            'password' => env('DB_PASSWORD', ''),
89
+            'charset' => 'utf8',
90
+            'prefix' => '',
91
+            'prefix_indexes' => true,
92
+        ],
93
+
94
+    ],
95
+
96
+    /*
97
+    |--------------------------------------------------------------------------
98
+    | Migration Repository Table
99
+    |--------------------------------------------------------------------------
100
+    |
101
+    | This table keeps track of all the migrations that have already run for
102
+    | your application. Using this information, we can determine which of
103
+    | the migrations on disk haven't actually been run in the database.
104
+    |
105
+    */
106
+
107
+    'migrations' => 'migrations',
108
+
109
+    /*
110
+    |--------------------------------------------------------------------------
111
+    | Redis Databases
112
+    |--------------------------------------------------------------------------
113
+    |
114
+    | Redis is an open source, fast, and advanced key-value store that also
115
+    | provides a richer body of commands than a typical key-value system
116
+    | such as APC or Memcached. Laravel makes it easy to dig right in.
117
+    |
118
+    */
119
+
120
+    'redis' => [
121
+
122
+        'client' => env('REDIS_CLIENT', 'predis'),
123
+
124
+        'options' => [
125
+            'cluster' => env('REDIS_CLUSTER', 'predis'),
126
+            'prefix' => Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
127
+        ],
128
+
129
+        'default' => [
130
+            'url' => env('REDIS_URL'),
131
+            'host' => env('REDIS_HOST', '127.0.0.1'),
132
+            'password' => env('REDIS_PASSWORD', null),
133
+            'port' => env('REDIS_PORT', 6379),
134
+            'database' => env('REDIS_DB', 0),
135
+        ],
136
+
137
+        'cache' => [
138
+            'url' => env('REDIS_URL'),
139
+            'host' => env('REDIS_HOST', '127.0.0.1'),
140
+            'password' => env('REDIS_PASSWORD', null),
141
+            'port' => env('REDIS_PORT', 6379),
142
+            'database' => env('REDIS_CACHE_DB', 1),
143
+        ],
144
+
145
+    ],
146
+
147
+];

+ 69
- 0
config/filesystems.php Voir le fichier

@@ -0,0 +1,69 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Default Filesystem Disk
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | Here you may specify the default filesystem disk that should be used
11
+    | by the framework. The "local" disk, as well as a variety of cloud
12
+    | based disks are available to your application. Just store away!
13
+    |
14
+    */
15
+
16
+    'default' => env('FILESYSTEM_DRIVER', 'local'),
17
+
18
+    /*
19
+    |--------------------------------------------------------------------------
20
+    | Default Cloud Filesystem Disk
21
+    |--------------------------------------------------------------------------
22
+    |
23
+    | Many applications store files both locally and in the cloud. For this
24
+    | reason, you may specify a default "cloud" driver here. This driver
25
+    | will be bound as the Cloud disk implementation in the container.
26
+    |
27
+    */
28
+
29
+    'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30
+
31
+    /*
32
+    |--------------------------------------------------------------------------
33
+    | Filesystem Disks
34
+    |--------------------------------------------------------------------------
35
+    |
36
+    | Here you may configure as many filesystem "disks" as you wish, and you
37
+    | may even configure multiple disks of the same driver. Defaults have
38
+    | been setup for each driver as an example of the required options.
39
+    |
40
+    | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
41
+    |
42
+    */
43
+
44
+    'disks' => [
45
+
46
+        'local' => [
47
+            'driver' => 'local',
48
+            'root' => storage_path('app'),
49
+        ],
50
+
51
+        'public' => [
52
+            'driver' => 'local',
53
+            'root' => storage_path('app/public'),
54
+            'url' => env('APP_URL').'/storage',
55
+            'visibility' => 'public',
56
+        ],
57
+
58
+        's3' => [
59
+            'driver' => 's3',
60
+            'key' => env('AWS_ACCESS_KEY_ID'),
61
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
62
+            'region' => env('AWS_DEFAULT_REGION'),
63
+            'bucket' => env('AWS_BUCKET'),
64
+            'url' => env('AWS_URL'),
65
+        ],
66
+
67
+    ],
68
+
69
+];

+ 52
- 0
config/hashing.php Voir le fichier

@@ -0,0 +1,52 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Default Hash Driver
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | This option controls the default hash driver that will be used to hash
11
+    | passwords for your application. By default, the bcrypt algorithm is
12
+    | used; however, you remain free to modify this option if you wish.
13
+    |
14
+    | Supported: "bcrypt", "argon", "argon2id"
15
+    |
16
+    */
17
+
18
+    'driver' => 'bcrypt',
19
+
20
+    /*
21
+    |--------------------------------------------------------------------------
22
+    | Bcrypt Options
23
+    |--------------------------------------------------------------------------
24
+    |
25
+    | Here you may specify the configuration options that should be used when
26
+    | passwords are hashed using the Bcrypt algorithm. This will allow you
27
+    | to control the amount of time it takes to hash the given password.
28
+    |
29
+    */
30
+
31
+    'bcrypt' => [
32
+        'rounds' => env('BCRYPT_ROUNDS', 10),
33
+    ],
34
+
35
+    /*
36
+    |--------------------------------------------------------------------------
37
+    | Argon Options
38
+    |--------------------------------------------------------------------------
39
+    |
40
+    | Here you may specify the configuration options that should be used when
41
+    | passwords are hashed using the Argon algorithm. These will allow you
42
+    | to control the amount of time it takes to hash the given password.
43
+    |
44
+    */
45
+
46
+    'argon' => [
47
+        'memory' => 1024,
48
+        'threads' => 2,
49
+        'time' => 2,
50
+    ],
51
+
52
+];

+ 94
- 0
config/logging.php Voir le fichier

@@ -0,0 +1,94 @@
1
+<?php
2
+
3
+use Monolog\Handler\StreamHandler;
4
+use Monolog\Handler\SyslogUdpHandler;
5
+
6
+return [
7
+
8
+    /*
9
+    |--------------------------------------------------------------------------
10
+    | Default Log Channel
11
+    |--------------------------------------------------------------------------
12
+    |
13
+    | This option defines the default log channel that gets used when writing
14
+    | messages to the logs. The name specified in this option should match
15
+    | one of the channels defined in the "channels" configuration array.
16
+    |
17
+    */
18
+
19
+    'default' => env('LOG_CHANNEL', 'stack'),
20
+
21
+    /*
22
+    |--------------------------------------------------------------------------
23
+    | Log Channels
24
+    |--------------------------------------------------------------------------
25
+    |
26
+    | Here you may configure the log channels for your application. Out of
27
+    | the box, Laravel uses the Monolog PHP logging library. This gives
28
+    | you a variety of powerful log handlers / formatters to utilize.
29
+    |
30
+    | Available Drivers: "single", "daily", "slack", "syslog",
31
+    |                    "errorlog", "monolog",
32
+    |                    "custom", "stack"
33
+    |
34
+    */
35
+
36
+    'channels' => [
37
+        'stack' => [
38
+            'driver' => 'stack',
39
+            'channels' => ['daily'],
40
+            'ignore_exceptions' => false,
41
+        ],
42
+
43
+        'single' => [
44
+            'driver' => 'single',
45
+            'path' => storage_path('logs/laravel.log'),
46
+            'level' => 'debug',
47
+        ],
48
+
49
+        'daily' => [
50
+            'driver' => 'daily',
51
+            'path' => storage_path('logs/laravel.log'),
52
+            'level' => 'debug',
53
+            'days' => 14,
54
+        ],
55
+
56
+        'slack' => [
57
+            'driver' => 'slack',
58
+            'url' => env('LOG_SLACK_WEBHOOK_URL'),
59
+            'username' => 'Laravel Log',
60
+            'emoji' => ':boom:',
61
+            'level' => 'critical',
62
+        ],
63
+
64
+        'papertrail' => [
65
+            'driver' => 'monolog',
66
+            'level' => 'debug',
67
+            'handler' => SyslogUdpHandler::class,
68
+            'handler_with' => [
69
+                'host' => env('PAPERTRAIL_URL'),
70
+                'port' => env('PAPERTRAIL_PORT'),
71
+            ],
72
+        ],
73
+
74
+        'stderr' => [
75
+            'driver' => 'monolog',
76
+            'handler' => StreamHandler::class,
77
+            'formatter' => env('LOG_STDERR_FORMATTER'),
78
+            'with' => [
79
+                'stream' => 'php://stderr',
80
+            ],
81
+        ],
82
+
83
+        'syslog' => [
84
+            'driver' => 'syslog',
85
+            'level' => 'debug',
86
+        ],
87
+
88
+        'errorlog' => [
89
+            'driver' => 'errorlog',
90
+            'level' => 'debug',
91
+        ],
92
+    ],
93
+
94
+];

+ 136
- 0
config/mail.php Voir le fichier

@@ -0,0 +1,136 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Mail Driver
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | Laravel supports both SMTP and PHP's "mail" function as drivers for the
11
+    | sending of e-mail. You may specify which one you're using throughout
12
+    | your application here. By default, Laravel is setup for SMTP mail.
13
+    |
14
+    | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
15
+    |            "sparkpost", "postmark", "log", "array"
16
+    |
17
+    */
18
+
19
+    'driver' => env('MAIL_DRIVER', 'smtp'),
20
+
21
+    /*
22
+    |--------------------------------------------------------------------------
23
+    | SMTP Host Address
24
+    |--------------------------------------------------------------------------
25
+    |
26
+    | Here you may provide the host address of the SMTP server used by your
27
+    | applications. A default option is provided that is compatible with
28
+    | the Mailgun mail service which will provide reliable deliveries.
29
+    |
30
+    */
31
+
32
+    'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33
+
34
+    /*
35
+    |--------------------------------------------------------------------------
36
+    | SMTP Host Port
37
+    |--------------------------------------------------------------------------
38
+    |
39
+    | This is the SMTP port used by your application to deliver e-mails to
40
+    | users of the application. Like the host we have set this value to
41
+    | stay compatible with the Mailgun e-mail application by default.
42
+    |
43
+    */
44
+
45
+    'port' => env('MAIL_PORT', 587),
46
+
47
+    /*
48
+    |--------------------------------------------------------------------------
49
+    | Global "From" Address
50
+    |--------------------------------------------------------------------------
51
+    |
52
+    | You may wish for all e-mails sent by your application to be sent from
53
+    | the same address. Here, you may specify a name and address that is
54
+    | used globally for all e-mails that are sent by your application.
55
+    |
56
+    */
57
+
58
+    'from' => [
59
+        'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
60
+        'name' => env('MAIL_FROM_NAME', 'Example'),
61
+    ],
62
+
63
+    /*
64
+    |--------------------------------------------------------------------------
65
+    | E-Mail Encryption Protocol
66
+    |--------------------------------------------------------------------------
67
+    |
68
+    | Here you may specify the encryption protocol that should be used when
69
+    | the application send e-mail messages. A sensible default using the
70
+    | transport layer security protocol should provide great security.
71
+    |
72
+    */
73
+
74
+    'encryption' => env('MAIL_ENCRYPTION', 'tls'),
75
+
76
+    /*
77
+    |--------------------------------------------------------------------------
78
+    | SMTP Server Username
79
+    |--------------------------------------------------------------------------
80
+    |
81
+    | If your SMTP server requires a username for authentication, you should
82
+    | set it here. This will get used to authenticate with your server on
83
+    | connection. You may also set the "password" value below this one.
84
+    |
85
+    */
86
+
87
+    'username' => env('MAIL_USERNAME'),
88
+
89
+    'password' => env('MAIL_PASSWORD'),
90
+
91
+    /*
92
+    |--------------------------------------------------------------------------
93
+    | Sendmail System Path
94
+    |--------------------------------------------------------------------------
95
+    |
96
+    | When using the "sendmail" driver to send e-mails, we will need to know
97
+    | the path to where Sendmail lives on this server. A default path has
98
+    | been provided here, which will work well on most of your systems.
99
+    |
100
+    */
101
+
102
+    'sendmail' => '/usr/sbin/sendmail -bs',
103
+
104
+    /*
105
+    |--------------------------------------------------------------------------
106
+    | Markdown Mail Settings
107
+    |--------------------------------------------------------------------------
108
+    |
109
+    | If you are using Markdown based email rendering, you may configure your
110
+    | theme and component paths here, allowing you to customize the design
111
+    | of the emails. Or, you may simply stick with the Laravel defaults!
112
+    |
113
+    */
114
+
115
+    'markdown' => [
116
+        'theme' => 'default',
117
+
118
+        'paths' => [
119
+            resource_path('views/vendor/mail'),
120
+        ],
121
+    ],
122
+
123
+    /*
124
+    |--------------------------------------------------------------------------
125
+    | Log Channel
126
+    |--------------------------------------------------------------------------
127
+    |
128
+    | If you are using the "log" driver, you may specify the logging channel
129
+    | if you prefer to keep mail messages separate from other log entries
130
+    | for simpler reading. Otherwise, the default channel will be used.
131
+    |
132
+    */
133
+
134
+    'log_channel' => env('MAIL_LOG_CHANNEL'),
135
+
136
+];

+ 87
- 0
config/queue.php Voir le fichier

@@ -0,0 +1,87 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Default Queue Connection Name
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | Laravel's queue API supports an assortment of back-ends via a single
11
+    | API, giving you convenient access to each back-end using the same
12
+    | syntax for every one. Here you may define a default connection.
13
+    |
14
+    */
15
+
16
+    'default' => env('QUEUE_CONNECTION', 'sync'),
17
+
18
+    /*
19
+    |--------------------------------------------------------------------------
20
+    | Queue Connections
21
+    |--------------------------------------------------------------------------
22
+    |
23
+    | Here you may configure the connection information for each server that
24
+    | is used by your application. A default configuration has been added
25
+    | for each back-end shipped with Laravel. You are free to add more.
26
+    |
27
+    | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28
+    |
29
+    */
30
+
31
+    'connections' => [
32
+
33
+        'sync' => [
34
+            'driver' => 'sync',
35
+        ],
36
+
37
+        'database' => [
38
+            'driver' => 'database',
39
+            'table' => 'jobs',
40
+            'queue' => 'default',
41
+            'retry_after' => 90,
42
+        ],
43
+
44
+        'beanstalkd' => [
45
+            'driver' => 'beanstalkd',
46
+            'host' => 'localhost',
47
+            'queue' => 'default',
48
+            'retry_after' => 90,
49
+            'block_for' => 0,
50
+        ],
51
+
52
+        'sqs' => [
53
+            'driver' => 'sqs',
54
+            'key' => env('AWS_ACCESS_KEY_ID'),
55
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
56
+            'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57
+            'queue' => env('SQS_QUEUE', 'your-queue-name'),
58
+            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
59
+        ],
60
+
61
+        'redis' => [
62
+            'driver' => 'redis',
63
+            'connection' => 'default',
64
+            'queue' => env('REDIS_QUEUE', 'default'),
65
+            'retry_after' => 90,
66
+            'block_for' => null,
67
+        ],
68
+
69
+    ],
70
+
71
+    /*
72
+    |--------------------------------------------------------------------------
73
+    | Failed Queue Jobs
74
+    |--------------------------------------------------------------------------
75
+    |
76
+    | These options configure the behavior of failed queue job logging so you
77
+    | can control which database and table are used to store the jobs that
78
+    | have failed. You may change them to any database / table you wish.
79
+    |
80
+    */
81
+
82
+    'failed' => [
83
+        'database' => env('DB_CONNECTION', 'mysql'),
84
+        'table' => 'failed_jobs',
85
+    ],
86
+
87
+];

+ 52
- 0
config/services.php Voir le fichier

@@ -0,0 +1,52 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | Third Party Services
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | This file is for storing the credentials for third party services such
11
+    | as Stripe, Mailgun, SparkPost and others. This file provides a sane
12
+    | default location for this type of information, allowing packages
13
+    | to have a conventional place to find your various credentials.
14
+    |
15
+    */
16
+    'google' => [
17
+        'client_id'     => env('GOOGLE_CLIENT_ID'),
18
+        'client_secret' => env('GOOGLE_CLIENT_SECRET'),
19
+        'redirect'      => env('GOOGLE_REDIRECT', '/')
20
+    ],
21
+
22
+    'mailgun' => [
23
+        'domain' => env('MAILGUN_DOMAIN'),
24
+        'secret' => env('MAILGUN_SECRET'),
25
+        'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
26
+    ],
27
+
28
+    'postmark' => [
29
+        'token' => env('POSTMARK_TOKEN'),
30
+    ],
31
+
32
+    'ses' => [
33
+        'key' => env('AWS_ACCESS_KEY_ID'),
34
+        'secret' => env('AWS_SECRET_ACCESS_KEY'),
35
+        'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
36
+    ],
37
+
38
+    'sparkpost' => [
39
+        'secret' => env('SPARKPOST_SECRET'),
40
+    ],
41
+
42
+    'stripe' => [
43
+        'model' => App\User::class,
44
+        'key' => env('STRIPE_KEY'),
45
+        'secret' => env('STRIPE_SECRET'),
46
+        'webhook' => [
47
+            'secret' => env('STRIPE_WEBHOOK_SECRET'),
48
+            'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
49
+        ],
50
+    ],
51
+
52
+];

+ 199
- 0
config/session.php Voir le fichier

@@ -0,0 +1,199 @@
1
+<?php
2
+
3
+use Illuminate\Support\Str;
4
+
5
+return [
6
+
7
+    /*
8
+    |--------------------------------------------------------------------------
9
+    | Default Session Driver
10
+    |--------------------------------------------------------------------------
11
+    |
12
+    | This option controls the default session "driver" that will be used on
13
+    | requests. By default, we will use the lightweight native driver but
14
+    | you may specify any of the other wonderful drivers provided here.
15
+    |
16
+    | Supported: "file", "cookie", "database", "apc",
17
+    |            "memcached", "redis", "dynamodb", "array"
18
+    |
19
+    */
20
+
21
+    'driver' => env('SESSION_DRIVER', 'file'),
22
+
23
+    /*
24
+    |--------------------------------------------------------------------------
25
+    | Session Lifetime
26
+    |--------------------------------------------------------------------------
27
+    |
28
+    | Here you may specify the number of minutes that you wish the session
29
+    | to be allowed to remain idle before it expires. If you want them
30
+    | to immediately expire on the browser closing, set that option.
31
+    |
32
+    */
33
+
34
+    'lifetime' => env('SESSION_LIFETIME', 120),
35
+
36
+    'expire_on_close' => false,
37
+
38
+    /*
39
+    |--------------------------------------------------------------------------
40
+    | Session Encryption
41
+    |--------------------------------------------------------------------------
42
+    |
43
+    | This option allows you to easily specify that all of your session data
44
+    | should be encrypted before it is stored. All encryption will be run
45
+    | automatically by Laravel and you can use the Session like normal.
46
+    |
47
+    */
48
+
49
+    'encrypt' => false,
50
+
51
+    /*
52
+    |--------------------------------------------------------------------------
53
+    | Session File Location
54
+    |--------------------------------------------------------------------------
55
+    |
56
+    | When using the native session driver, we need a location where session
57
+    | files may be stored. A default has been set for you but a different
58
+    | location may be specified. This is only needed for file sessions.
59
+    |
60
+    */
61
+
62
+    'files' => storage_path('framework/sessions'),
63
+
64
+    /*
65
+    |--------------------------------------------------------------------------
66
+    | Session Database Connection
67
+    |--------------------------------------------------------------------------
68
+    |
69
+    | When using the "database" or "redis" session drivers, you may specify a
70
+    | connection that should be used to manage these sessions. This should
71
+    | correspond to a connection in your database configuration options.
72
+    |
73
+    */
74
+
75
+    'connection' => env('SESSION_CONNECTION', null),
76
+
77
+    /*
78
+    |--------------------------------------------------------------------------
79
+    | Session Database Table
80
+    |--------------------------------------------------------------------------
81
+    |
82
+    | When using the "database" session driver, you may specify the table we
83
+    | should use to manage the sessions. Of course, a sensible default is
84
+    | provided for you; however, you are free to change this as needed.
85
+    |
86
+    */
87
+
88
+    'table' => 'sessions',
89
+
90
+    /*
91
+    |--------------------------------------------------------------------------
92
+    | Session Cache Store
93
+    |--------------------------------------------------------------------------
94
+    |
95
+    | When using the "apc", "memcached", or "dynamodb" session drivers you may
96
+    | list a cache store that should be used for these sessions. This value
97
+    | must match with one of the application's configured cache "stores".
98
+    |
99
+    */
100
+
101
+    'store' => env('SESSION_STORE', null),
102
+
103
+    /*
104
+    |--------------------------------------------------------------------------
105
+    | Session Sweeping Lottery
106
+    |--------------------------------------------------------------------------
107
+    |
108
+    | Some session drivers must manually sweep their storage location to get
109
+    | rid of old sessions from storage. Here are the chances that it will
110
+    | happen on a given request. By default, the odds are 2 out of 100.
111
+    |
112
+    */
113
+
114
+    'lottery' => [2, 100],
115
+
116
+    /*
117
+    |--------------------------------------------------------------------------
118
+    | Session Cookie Name
119
+    |--------------------------------------------------------------------------
120
+    |
121
+    | Here you may change the name of the cookie used to identify a session
122
+    | instance by ID. The name specified here will get used every time a
123
+    | new session cookie is created by the framework for every driver.
124
+    |
125
+    */
126
+
127
+    'cookie' => env(
128
+        'SESSION_COOKIE',
129
+        Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
130
+    ),
131
+
132
+    /*
133
+    |--------------------------------------------------------------------------
134
+    | Session Cookie Path
135
+    |--------------------------------------------------------------------------
136
+    |
137
+    | The session cookie path determines the path for which the cookie will
138
+    | be regarded as available. Typically, this will be the root path of
139
+    | your application but you are free to change this when necessary.
140
+    |
141
+    */
142
+
143
+    'path' => '/',
144
+
145
+    /*
146
+    |--------------------------------------------------------------------------
147
+    | Session Cookie Domain
148
+    |--------------------------------------------------------------------------
149
+    |
150
+    | Here you may change the domain of the cookie used to identify a session
151
+    | in your application. This will determine which domains the cookie is
152
+    | available to in your application. A sensible default has been set.
153
+    |
154
+    */
155
+
156
+    'domain' => env('SESSION_DOMAIN', null),
157
+
158
+    /*
159
+    |--------------------------------------------------------------------------
160
+    | HTTPS Only Cookies
161
+    |--------------------------------------------------------------------------
162
+    |
163
+    | By setting this option to true, session cookies will only be sent back
164
+    | to the server if the browser has a HTTPS connection. This will keep
165
+    | the cookie from being sent to you if it can not be done securely.
166
+    |
167
+    */
168
+
169
+    'secure' => env('SESSION_SECURE_COOKIE', false),
170
+
171
+    /*
172
+    |--------------------------------------------------------------------------
173
+    | HTTP Access Only
174
+    |--------------------------------------------------------------------------
175
+    |
176
+    | Setting this value to true will prevent JavaScript from accessing the
177
+    | value of the cookie and the cookie will only be accessible through
178
+    | the HTTP protocol. You are free to modify this option if needed.
179
+    |
180
+    */
181
+
182
+    'http_only' => true,
183
+
184
+    /*
185
+    |--------------------------------------------------------------------------
186
+    | Same-Site Cookies
187
+    |--------------------------------------------------------------------------
188
+    |
189
+    | This option determines how your cookies behave when cross-site requests
190
+    | take place, and can be used to mitigate CSRF attacks. By default, we
191
+    | do not enable this as other CSRF protection services are in place.
192
+    |
193
+    | Supported: "lax", "strict"
194
+    |
195
+    */
196
+
197
+    'same_site' => null,
198
+
199
+];

+ 156
- 0
config/telescope.php Voir le fichier

@@ -0,0 +1,156 @@
1
+<?php
2
+
3
+use Laravel\Telescope\Watchers;
4
+use Laravel\Telescope\Http\Middleware\Authorize;
5
+
6
+return [
7
+
8
+    /*
9
+    |--------------------------------------------------------------------------
10
+    | Telescope Domain
11
+    |--------------------------------------------------------------------------
12
+    |
13
+    | This is the subdomain where Telescope will be accessible from. If the
14
+    | setting is null, Telescope will reside under the same domain as the
15
+    | application. Otherwise, this value will be used as the subdomain.
16
+    |
17
+    */
18
+
19
+    'domain' => env('TELESCOPE_DOMAIN', null),
20
+
21
+    /*
22
+    |--------------------------------------------------------------------------
23
+    | Telescope Path
24
+    |--------------------------------------------------------------------------
25
+    |
26
+    | This is the URI path where Telescope will be accessible from. Feel free
27
+    | to change this path to anything you like. Note that the URI will not
28
+    | affect the paths of its internal API that aren't exposed to users.
29
+    |
30
+    */
31
+
32
+    'path' => env('TELESCOPE_PATH', 'telescope'),
33
+
34
+    /*
35
+    |--------------------------------------------------------------------------
36
+    | Telescope Storage Driver
37
+    |--------------------------------------------------------------------------
38
+    |
39
+    | This configuration options determines the storage driver that will
40
+    | be used to store Telescope's data. In addition, you may set any
41
+    | custom options as needed by the particular driver you choose.
42
+    |
43
+    */
44
+
45
+    'driver' => env('TELESCOPE_DRIVER', 'database'),
46
+
47
+    'storage' => [
48
+        'database' => [
49
+            'connection' => env('DB_CONNECTION', 'mysql'),
50
+            'chunk' => 1000,
51
+        ],
52
+    ],
53
+
54
+    /*
55
+    |--------------------------------------------------------------------------
56
+    | Telescope Master Switch
57
+    |--------------------------------------------------------------------------
58
+    |
59
+    | This option may be used to disable all Telescope watchers regardless
60
+    | of their individual configuration, which simply provides a single
61
+    | and convenient way to enable or disable Telescope data storage.
62
+    |
63
+    */
64
+
65
+    'enabled' => env('TELESCOPE_ENABLED', true),
66
+
67
+    /*
68
+    |--------------------------------------------------------------------------
69
+    | Telescope Route Middleware
70
+    |--------------------------------------------------------------------------
71
+    |
72
+    | These middleware will be assigned to every Telescope route, giving you
73
+    | the chance to add your own middleware to this list or change any of
74
+    | the existing middleware. Or, you can simply stick with this list.
75
+    |
76
+    */
77
+
78
+    'middleware' => [
79
+        'web',
80
+        Authorize::class,
81
+    ],
82
+
83
+    /*
84
+    |--------------------------------------------------------------------------
85
+    | Ignored Paths & Commands
86
+    |--------------------------------------------------------------------------
87
+    |
88
+    | The following array lists the URI paths and Artisan commands that will
89
+    | not be watched by Telescope. In addition to this list, some Laravel
90
+    | commands, like migrations and queue commands, are always ignored.
91
+    |
92
+    */
93
+
94
+    'ignore_paths' => [
95
+        //
96
+    ],
97
+
98
+    'ignore_commands' => [
99
+        //
100
+    ],
101
+
102
+    /*
103
+    |--------------------------------------------------------------------------
104
+    | Telescope Watchers
105
+    |--------------------------------------------------------------------------
106
+    |
107
+    | The following array lists the "watchers" that will be registered with
108
+    | Telescope. The watchers gather the application's profile data when
109
+    | a request or task is executed. Feel free to customize this list.
110
+    |
111
+    */
112
+
113
+    'watchers' => [
114
+        Watchers\CacheWatcher::class => env('TELESCOPE_CACHE_WATCHER', true),
115
+
116
+        Watchers\CommandWatcher::class => [
117
+            'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
118
+            'ignore' => [],
119
+        ],
120
+
121
+        Watchers\DumpWatcher::class => env('TELESCOPE_DUMP_WATCHER', true),
122
+        Watchers\EventWatcher::class => env('TELESCOPE_EVENT_WATCHER', true),
123
+        Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
124
+        Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
125
+        Watchers\LogWatcher::class => env('TELESCOPE_LOG_WATCHER', true),
126
+        Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
127
+
128
+        Watchers\ModelWatcher::class => [
129
+            'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
130
+            'events' => ['eloquent.*'],
131
+        ],
132
+
133
+        Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),
134
+
135
+        Watchers\QueryWatcher::class => [
136
+            'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
137
+            'ignore_packages' => true,
138
+            'slow' => 100,
139
+        ],
140
+
141
+        Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),
142
+
143
+        Watchers\RequestWatcher::class => [
144
+            'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
145
+            'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
146
+        ],
147
+
148
+        Watchers\GateWatcher::class => [
149
+            'enabled' => env('TELESCOPE_GATE_WATCHER', true),
150
+            'ignore_abilities' => [],
151
+            'ignore_packages' => true,
152
+        ],
153
+
154
+        Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
155
+    ],
156
+];

+ 36
- 0
config/view.php Voir le fichier

@@ -0,0 +1,36 @@
1
+<?php
2
+
3
+return [
4
+
5
+    /*
6
+    |--------------------------------------------------------------------------
7
+    | View Storage Paths
8
+    |--------------------------------------------------------------------------
9
+    |
10
+    | Most templating systems load templates from disk. Here you may specify
11
+    | an array of paths that should be checked for your views. Of course
12
+    | the usual Laravel view path has already been registered for you.
13
+    |
14
+    */
15
+
16
+    'paths' => [
17
+        resource_path('views'),
18
+    ],
19
+
20
+    /*
21
+    |--------------------------------------------------------------------------
22
+    | Compiled View Path
23
+    |--------------------------------------------------------------------------
24
+    |
25
+    | This option determines where all the compiled Blade templates will be
26
+    | stored for your application. Typically, this is within the storage
27
+    | directory. However, as usual, you are free to change this value.
28
+    |
29
+    */
30
+
31
+    'compiled' => env(
32
+        'VIEW_COMPILED_PATH',
33
+        realpath(storage_path('framework/views'))
34
+    ),
35
+
36
+];

+ 2
- 0
database/.gitignore Voir le fichier

@@ -0,0 +1,2 @@
1
+*.sqlite
2
+*.sqlite-journal

+ 15
- 0
database/factories/CourseFactory.php Voir le fichier

@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Course;
6
+use Faker\Generator as Faker;
7
+
8
+$factory->define(Course::class, function (Faker $faker) {
9
+    return [
10
+        'code' => $faker->unique()->bothify('????####'),
11
+        'dept_id' => 1,
12
+        'syllabus' => $faker->optional()->text(255),
13
+        'title' => $faker->text(),
14
+    ];
15
+});

+ 12
- 0
database/factories/DepartmentFactory.php Voir le fichier

@@ -0,0 +1,12 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Department;
6
+use Faker\Generator as Faker;
7
+
8
+$factory->define(Department::class, function (Faker $faker) {
9
+    return [
10
+        'name' => $faker->text(),
11
+    ];
12
+});

+ 18
- 0
database/factories/ProfessorFactory.php Voir le fichier

@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Professor;
6
+use Faker\Generator as Faker;
7
+
8
+$factory->define(Professor::class, function (Faker $faker) {
9
+    return [
10
+        'num_prof'      => $faker->numerify('#########'),
11
+        'first_name'    => $faker->firstName(),
12
+        'last_name'     => $faker->lastName(),
13
+        'email'         => $faker->email,
14
+        'type'          => null,
15
+        'dept_id'       => 1,
16
+
17
+    ];
18
+});

+ 17
- 0
database/factories/ProfessorSectionFactory.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Model;
6
+use Faker\Generator as Faker;
7
+use App\Section;
8
+
9
+$factory->define(Model::class, function (Faker $faker) {
10
+    return [
11
+        'professor_id'       => $faker->randomNumber(1, Professor::count()),
12
+        'section_id'    => $faker->randomNumber(1, Section::count()),
13
+        'percent'       => $faker->optional()->randomNumber(1, 100),
14
+        'schedule'      => $faker->optional()->dateTime,
15
+        'eval'          => $faker->optional()->randomFloat(2, 0, 100),
16
+    ];
17
+});

+ 16
- 0
database/factories/ProfessorSemesterFactory.php Voir le fichier

@@ -0,0 +1,16 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Model;
6
+use Faker\Generator as Faker;
7
+use App\Semester;
8
+
9
+$factory->define(Model::class, function (Faker $faker) {
10
+    return [
11
+        'professor_id'       => $faker->randomNumber(1, Professor::count()),
12
+        'semester_code'      => $faker->randomElement(Semester::all()->pluck('code')->toArray()),
13
+        'admin_load'    => $faker->randomFloat(2, 0, 100),
14
+        'investigative_load'    => $faker->randomFloat(2, 0, 100),
15
+    ];
16
+});

+ 20
- 0
database/factories/SectionFactory.php Voir le fichier

@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+/* @var $factory \Illuminate\Database\Eloquent\Factory */
4
+
5
+use App\Section;
6
+use Faker\Generator as Faker;
7
+use App\Semester;
8
+use App\Course;
9
+
10
+$factory->define(Section::class, function (Faker $faker) {
11
+    // dd(Semester::all()->pluck('code')->toArray());
12
+    return [
13
+        'semester_code'      => $faker->randomElement(Semester::all()->pluck('code')->toArray()),
14
+        'course_id'     => $faker->numberBetween(1, Course::count()),
15
+        'code'          => $faker->lexify('???'),
16
+        'student_count' => $faker->optional()->randomNumber(3),
17
+        'syllabus'      => $faker->optional()->text(),
18
+        'credits'       => $faker->optional()->randomFloat(2,0,4),
19
+    ];
20
+});

+ 27
- 0
database/factories/UserFactory.php Voir le fichier

@@ -0,0 +1,27 @@
1
+<?php
2
+
3
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
4
+use App\User;
5
+use Illuminate\Support\Str;
6
+use Faker\Generator as Faker;
7
+
8
+/*
9
+|--------------------------------------------------------------------------
10
+| Model Factories
11
+|--------------------------------------------------------------------------
12
+|
13
+| This directory should contain each of the model factory definitions for
14
+| your application. Factories provide a convenient way to generate new
15
+| model instances for testing / seeding your application's database.
16
+|
17
+*/
18
+
19
+$factory->define(User::class, function (Faker $faker) {
20
+    return [
21
+        'name' => $faker->name,
22
+        'email' => $faker->unique()->safeEmail,
23
+        'email_verified_at' => now(),
24
+        'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
25
+        'remember_token' => Str::random(10),
26
+    ];
27
+});

+ 37
- 0
database/migrations/2014_10_12_000000_create_users_table.php Voir le fichier

@@ -0,0 +1,37 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateUsersTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('users', function (Blueprint $table) {
17
+            $table->bigIncrements('id');
18
+            $table->string('name');
19
+            $table->string('google_id');
20
+            $table->string('email')->unique();
21
+            $table->timestamp('email_verified_at')->nullable();
22
+            // $table->string('password')->nullable();
23
+            $table->rememberToken();
24
+            $table->timestamps();
25
+        });
26
+    }
27
+
28
+    /**
29
+     * Reverse the migrations.
30
+     *
31
+     * @return void
32
+     */
33
+    public function down()
34
+    {
35
+        Schema::dropIfExists('users');
36
+    }
37
+}

+ 32
- 0
database/migrations/2014_10_12_100000_create_password_resets_table.php Voir le fichier

@@ -0,0 +1,32 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreatePasswordResetsTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('password_resets', function (Blueprint $table) {
17
+            $table->string('email')->index();
18
+            $table->string('token');
19
+            $table->timestamp('created_at')->nullable();
20
+        });
21
+    }
22
+
23
+    /**
24
+     * Reverse the migrations.
25
+     *
26
+     * @return void
27
+     */
28
+    public function down()
29
+    {
30
+        Schema::dropIfExists('password_resets');
31
+    }
32
+}

+ 61
- 0
database/migrations/2019_07_07_152338_create_semesters_table.php Voir le fichier

@@ -0,0 +1,61 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+use App\Semester;
7
+
8
+class CreateSemestersTable extends Migration
9
+{
10
+    /**
11
+     * Run the migrations.
12
+     *
13
+     * @return void
14
+     */
15
+    public function up()
16
+    {
17
+        Schema::create('semesters', function (Blueprint $table) {
18
+            $table->char('code', 3)->primary();
19
+            $table->string('alpha');
20
+        });
21
+
22
+        DB::table('semesters')->insert(
23
+            array(
24
+                array('code' => 'B31','alpha' => '2013-2014 SEM 1'),
25
+                array('code' => 'B32','alpha' => '2013-2014 SEM 2'),
26
+                array('code' => 'B33','alpha' => '2013-2014 VERANO'),
27
+                array('code' => 'B41','alpha' => '2014-2015 SEM 1'),
28
+                array('code' => 'B42','alpha' => '2014-2015 SEM 2'),
29
+                array('code' => 'B43','alpha' => '2014-2015 VERANO'),
30
+                array('code' => 'B51','alpha' => '2015-2016 SEM 1'),
31
+                array('code' => 'B52','alpha' => '2015-2016 SEM 2'),
32
+                array('code' => 'B53','alpha' => '2015-2016 VERANO'),
33
+                array('code' => 'B61','alpha' => '2016-2017 SEM 1'),
34
+                array('code' => 'B62','alpha' => '2016-2017 SEM 2'),
35
+                array('code' => 'B63','alpha' => '2016-2017 VERANO'),
36
+                array('code' => 'B71','alpha' => '2017-2018 SEM 1'),
37
+                array('code' => 'B72','alpha' => '2017-2018 SEM 2'),
38
+                array('code' => 'B73','alpha' => '2017-2018 VERANO'),
39
+                array('code' => 'B81','alpha' => '2018-2019 SEM 1'),
40
+                array('code' => 'B82','alpha' => '2018-2019 SEM 2'),
41
+                array('code' => 'B83','alpha' => '2018-2019 VERANO'),
42
+                array('code' => 'B91','alpha' => '2019-2020 SEM 1'),
43
+                array('code' => 'B92','alpha' => '2019-2020 SEM 2'),
44
+                array('code' => 'B93','alpha' => '2019-2020 VERANO'),
45
+                array('code' => 'C01','alpha' => '2020-2021 SEM 1'),
46
+                array('code' => 'C02','alpha' => '2020-2021 SEM 2'),
47
+                array('code' => 'C03','alpha' => '2020-2021 VERANO')
48
+              )
49
+            );
50
+    }
51
+
52
+    /**
53
+     * Reverse the migrations.
54
+     *
55
+     * @return void
56
+     */
57
+    public function down()
58
+    {
59
+        Schema::dropIfExists('semesters');
60
+    }
61
+}

+ 42
- 0
database/migrations/2019_07_07_183013_create_departments_table.php Voir le fichier

@@ -0,0 +1,42 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateDepartmentsTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('departments', function (Blueprint $table) {
17
+            $table->unsignedBigInteger('id')->primary();
18
+            $table->string('name');
19
+        });
20
+
21
+        DB::table('departments')->insert(
22
+            array(
23
+                array('id' => '0','name' => 'default'),
24
+                array('id' => '1','name' => 'BIOL'),
25
+                array('id' => '4','name' => 'CIAM'),
26
+                array('id' => '2','name' => 'FISI'),
27
+                array('id' => '3','name' => 'MATE'),
28
+                array('id' => '5','name' => 'PGCN'),
29
+                array('id' => '6','name' => 'QUIM')
30
+            ));
31
+    }
32
+
33
+    /**
34
+     * Reverse the migrations.
35
+     *
36
+     * @return void
37
+     */
38
+    public function down()
39
+    {
40
+        Schema::dropIfExists('departments');
41
+    }
42
+}

+ 36
- 0
database/migrations/2019_07_07_190000_create_courses_table.php Voir le fichier

@@ -0,0 +1,36 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateCoursesTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('courses', function (Blueprint $table) {
17
+            $table->bigIncrements('id');
18
+            $table->char('code', 8)->unique();
19
+            $table->string('title');
20
+            $table->unsignedBigInteger('dept_id');
21
+            $table->string('syllabus')->nullable();
22
+
23
+            $table->foreign('dept_id')->references('id')->on('departments');
24
+        });
25
+    }
26
+
27
+    /**
28
+     * Reverse the migrations.
29
+     *
30
+     * @return void
31
+     */
32
+    public function down()
33
+    {
34
+        Schema::dropIfExists('courses');
35
+    }
36
+}

+ 42
- 0
database/migrations/2019_07_07_191614_create_sections_table.php Voir le fichier

@@ -0,0 +1,42 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateSectionsTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('sections', function (Blueprint $table) {
17
+            $table->bigIncrements('id');
18
+            $table->char('semester_code', 3);
19
+            $table->unsignedBigInteger('course_id');
20
+            $table->char('code', 3);
21
+            $table->unsignedInteger('student_count')->nullable();
22
+            $table->string('syllabus')->nullable();
23
+            $table->unsignedDecimal('credits')->nullable();
24
+
25
+
26
+            $table->foreign('semester_code')->references('code')->on('semesters');
27
+            $table->foreign('course_id')->references('id')->on('courses');
28
+
29
+            $table->unique(['semester_code', 'course_id', 'code']);
30
+        });
31
+    }
32
+
33
+    /**
34
+     * Reverse the migrations.
35
+     *
36
+     * @return void
37
+     */
38
+    public function down()
39
+    {
40
+        Schema::dropIfExists('sections');
41
+    }
42
+}

+ 39
- 0
database/migrations/2019_07_07_230040_create_professors_table.php Voir le fichier

@@ -0,0 +1,39 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateProfessorsTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('professors', function (Blueprint $table) {
17
+            $table->bigIncrements('id');
18
+            $table->string('num_prof', 16);
19
+            $table->string('first_name');
20
+            $table->string('last_name');
21
+            $table->string('system_name');
22
+            $table->string('email')->nullable();
23
+            $table->enum('type', ['plantilla', 'contrato', 'ta'])->nullable();
24
+            $table->unsignedBigInteger('dept_id')->default(0);
25
+
26
+            $table->foreign('dept_id')->references('id')->on('departments');
27
+        });
28
+    }
29
+
30
+    /**
31
+     * Reverse the migrations.
32
+     *
33
+     * @return void
34
+     */
35
+    public function down()
36
+    {
37
+        Schema::dropIfExists('professors');
38
+    }
39
+}

+ 38
- 0
database/migrations/2019_07_07_231850_create_professor_semester_table.php Voir le fichier

@@ -0,0 +1,38 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateProfessorSemesterTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('professor_semester', function (Blueprint $table) {
17
+            $table->unsignedBigInteger('professor_id');
18
+            $table->char('semester_code', 3);
19
+            $table->decimal('admin_load')->nullable();
20
+            $table->decimal('investigative_load')->nullable();
21
+
22
+            $table->foreign('professor_id')->references('id')->on('professors');
23
+            $table->foreign('semester_code')->references('code')->on('semesters');
24
+
25
+            $table->unique(['professor_id', 'semester_code']);
26
+        });
27
+    }
28
+
29
+    /**
30
+     * Reverse the migrations.
31
+     *
32
+     * @return void
33
+     */
34
+    public function down()
35
+    {
36
+        Schema::dropIfExists('professor_semester');
37
+    }
38
+}

+ 39
- 0
database/migrations/2019_07_07_231913_create_professor_section_table.php Voir le fichier

@@ -0,0 +1,39 @@
1
+<?php
2
+
3
+use Illuminate\Support\Facades\Schema;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Database\Migrations\Migration;
6
+
7
+class CreateProfessorSectionTable extends Migration
8
+{
9
+    /**
10
+     * Run the migrations.
11
+     *
12
+     * @return void
13
+     */
14
+    public function up()
15
+    {
16
+        Schema::create('professor_section', function (Blueprint $table) {
17
+            $table->unsignedBigInteger('professor_id');
18
+            $table->unsignedBigInteger('section_id');
19
+            $table->unsignedInteger('percent')->nullable();
20
+            $table->string('schedule')->nullable();
21
+            $table->float('eval')->nullable();
22
+
23
+            $table->foreign('professor_id')->references('id')->on('professors');
24
+            $table->foreign('section_id')->references('id')->on('sections');
25
+
26
+            $table->unique(['professor_id', 'section_id']);
27
+        });
28
+    }
29
+
30
+    /**
31
+     * Reverse the migrations.
32
+     *
33
+     * @return void
34
+     */
35
+    public function down()
36
+    {
37
+        Schema::dropIfExists('professor_section');
38
+    }
39
+}

+ 17
- 0
database/seeds/CourseSeeder.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+use App\Course;
5
+
6
+class CourseSeeder extends Seeder
7
+{
8
+    /**
9
+     * Run the database seeds.
10
+     *
11
+     * @return void
12
+     */
13
+    public function run()
14
+    {
15
+        factory(Course::class, 30)->create();
16
+    }
17
+}

+ 20
- 0
database/seeds/DatabaseSeeder.php Voir le fichier

@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+
5
+class DatabaseSeeder extends Seeder
6
+{
7
+    /**
8
+     * Seed the application's database.
9
+     *
10
+     * @return void
11
+     */
12
+    public function run()
13
+    {
14
+        $this->call(CourseSeeder::class);
15
+        $this->call(SectionSeeder::class);
16
+        $this->call(ProfessorSeeder::class);
17
+        $this->call(ProfessorSectionSeeder::class);
18
+        $this->call(ProfessorSemesterSeeder::class);
19
+    }
20
+}

+ 21
- 0
database/seeds/ProfessorSectionSeeder.php Voir le fichier

@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+use App\Professor;
5
+use App\Section;
6
+
7
+class ProfessorSectionSeeder extends Seeder
8
+{
9
+    /**
10
+     * Run the database seeds.
11
+     *
12
+     * @return void
13
+     */
14
+    public function run()
15
+    {
16
+        Professor::all()->each(function ($professor) {
17
+            $sections = Section::inRandomOrder()->take(3)->get();
18
+            $professor->sections()->saveMany($sections);
19
+        });
20
+    }
21
+}

+ 17
- 0
database/seeds/ProfessorSeeder.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+use App\Professor;
5
+
6
+class ProfessorSeeder extends Seeder
7
+{
8
+    /**
9
+     * Run the database seeds.
10
+     *
11
+     * @return void
12
+     */
13
+    public function run()
14
+    {
15
+        factory(Professor::class, 15)->create();
16
+    }
17
+}

+ 21
- 0
database/seeds/ProfessorSemesterSeeder.php Voir le fichier

@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+use App\Professor;
5
+use App\Semester;
6
+
7
+class ProfessorSemesterSeeder extends Seeder
8
+{
9
+    /**
10
+     * Run the database seeds.
11
+     *
12
+     * @return void
13
+     */
14
+    public function run()
15
+    {
16
+        Professor::all()->each(function ($professor) {
17
+            $semesters = Semester::inRandomOrder()->take(2)->get();
18
+            $professor->semesters()->saveMany($semesters);
19
+        });
20
+    }
21
+}

+ 17
- 0
database/seeds/SectionSeeder.php Voir le fichier

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+use Illuminate\Database\Seeder;
4
+use App\Section;
5
+
6
+class SectionSeeder extends Seeder
7
+{
8
+    /**
9
+     * Run the database seeds.
10
+     *
11
+     * @return void
12
+     */
13
+    public function run()
14
+    {
15
+        factory(Section::class, 100)->create();
16
+    }
17
+}

+ 10799
- 0
package-lock.json
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 41
- 0
package.json Voir le fichier

@@ -0,0 +1,41 @@
1
+{
2
+    "private": true,
3
+    "scripts": {
4
+        "dev": "npm run development",
5
+        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6
+        "watch": "npm run development -- --watch",
7
+        "watch-poll": "npm run watch -- --watch-poll",
8
+        "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",
9
+        "prod": "npm run production",
10
+        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11
+    },
12
+    "devDependencies": {
13
+        "axios": "^0.19",
14
+        "bootstrap": "^4.1.0",
15
+        "cross-env": "^5.1",
16
+        "jquery": "^3.2",
17
+        "laravel-mix": "^4.0.7",
18
+        "lodash": "^4.17.5",
19
+        "popper.js": "^1.12",
20
+        "resolve-url-loader": "^2.3.1",
21
+        "sass": "^1.15.2",
22
+        "sass-loader": "^7.1.0",
23
+        "var_dump": "^1.0.5",
24
+        "vue": "^2.5.17",
25
+        "vue-template-compiler": "^2.6.10"
26
+    },
27
+    "dependencies": {
28
+        "@material/auto-init": "^3.1.0",
29
+        "@material/button": "^3.1.0",
30
+        "@material/checkbox": "^3.1.0",
31
+        "@material/data-table": "^3.1.1",
32
+        "@material/dialog": "^3.2.0",
33
+        "@material/icon-button": "^3.2.0",
34
+        "@material/layout-grid": "^3.1.0",
35
+        "@material/ripple": "^3.1.0",
36
+        "@material/select": "^3.2.0",
37
+        "@material/textfield": "^3.2.0",
38
+        "@material/typography": "^3.1.0",
39
+        "pdfmake": "^0.1.59"
40
+    }
41
+}

+ 33
- 0
phpunit.xml Voir le fichier

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<phpunit backupGlobals="false"
3
+         backupStaticAttributes="false"
4
+         bootstrap="vendor/autoload.php"
5
+         colors="true"
6
+         convertErrorsToExceptions="true"
7
+         convertNoticesToExceptions="true"
8
+         convertWarningsToExceptions="true"
9
+         processIsolation="false"
10
+         stopOnFailure="false">
11
+    <testsuites>
12
+        <testsuite name="Unit">
13
+            <directory suffix="Test.php">./tests/Unit</directory>
14
+        </testsuite>
15
+
16
+        <testsuite name="Feature">
17
+            <directory suffix="Test.php">./tests/Feature</directory>
18
+        </testsuite>
19
+    </testsuites>
20
+    <filter>
21
+        <whitelist processUncoveredFilesFromWhitelist="true">
22
+            <directory suffix=".php">./app</directory>
23
+        </whitelist>
24
+    </filter>
25
+    <php>
26
+        <server name="APP_ENV" value="testing"/>
27
+        <server name="BCRYPT_ROUNDS" value="4"/>
28
+        <server name="CACHE_DRIVER" value="array"/>
29
+        <server name="MAIL_DRIVER" value="array"/>
30
+        <server name="QUEUE_CONNECTION" value="sync"/>
31
+        <server name="SESSION_DRIVER" value="array"/>
32
+    </php>
33
+</phpunit>

+ 21
- 0
public/.htaccess Voir le fichier

@@ -0,0 +1,21 @@
1
+<IfModule mod_rewrite.c>
2
+    <IfModule mod_negotiation.c>
3
+        Options -MultiViews -Indexes
4
+    </IfModule>
5
+
6
+    RewriteEngine On
7
+
8
+    # Handle Authorization Header
9
+    RewriteCond %{HTTP:Authorization} .
10
+    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11
+
12
+    # Redirect Trailing Slashes If Not A Folder...
13
+    RewriteCond %{REQUEST_FILENAME} !-d
14
+    RewriteCond %{REQUEST_URI} (.+)/$
15
+    RewriteRule ^ %1 [L,R=301]
16
+
17
+    # Handle Front Controller...
18
+    RewriteCond %{REQUEST_FILENAME} !-d
19
+    RewriteCond %{REQUEST_FILENAME} !-f
20
+    RewriteRule ^ index.php [L]
21
+</IfModule>

+ 1
- 0
public/css/addons/datatables.min.css Voir le fichier

@@ -0,0 +1 @@
1
+div.dataTables_wrapper div.dataTables_filter input,div.dataTables_wrapper div.dataTables_filter select,div.dataTables_wrapper div.dataTables_length input,div.dataTables_wrapper div.dataTables_length select{width:auto}table.dataTable thead{cursor:pointer}div.dataTables_wrapper div.dataTables_length.d-flex.flex-row label{margin-top:1.2rem;margin-right:1rem}div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select .select-dropdown,div.dataTables_wrapper div.dataTables_length.d-flex.flex-row .select-wrapper.mdb-select span{margin-top:1rem}div.dataTables_wrapper div.dataTables_filter label,div.dataTables_wrapper div.dataTables_length label{text-align:left;font-weight:400;padding-top:.5rem;padding-bottom:.5rem}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5rem;display:inline-block}div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{font-weight:400;padding-top:1rem;padding-bottom:1rem}div.dataTables_wrapper div.dataTables_paginate{text-align:right;margin:0}div.dataTables_wrapper div.dataTables_paginate ul.pagination{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:focus{background-color:#4285f4}div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link:focus{-webkit-box-shadow:none;box-shadow:none}@media (max-width:767px){div.dataTables_wrapper div .dataTables_filter,div.dataTables_wrapper div .dataTables_info,div.dataTables_wrapper div .dataTables_length,div.dataTables_wrapper div .dataTables_paginate ul.pagination{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}}.bs-select select{display:inline-block!important}table.dataTable thead>tr>td.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc{padding-right:30px}table.dataTable thead>tr>td:active,table.dataTable thead>tr>th:active{outline:0}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:after,table.dataTable thead .sorting_desc_disabled:before{position:absolute;bottom:.9em;display:block;opacity:.3;font-family:'Font Awesome\ 5 Free';font-weight:900;font-size:1rem}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\f0de"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc_disabled:after{content:"\f0dd";right:16px}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}

+ 13222
- 0
public/css/app.css
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 0
- 0
public/favicon.ico Voir le fichier


BIN
public/images/calendar-alt.png Voir le fichier


BIN
public/images/chalkboard-teacher-solid.png Voir le fichier


+ 1
- 0
public/images/chalkboard-teacher-solid.svg Voir le fichier

@@ -0,0 +1 @@
1
+<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chalkboard-teacher" class="svg-inline--fa fa-chalkboard-teacher fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M208 352c-2.39 0-4.78.35-7.06 1.09C187.98 357.3 174.35 360 160 360c-14.35 0-27.98-2.7-40.95-6.91-2.28-.74-4.66-1.09-7.05-1.09C49.94 352-.33 402.48 0 464.62.14 490.88 21.73 512 48 512h224c26.27 0 47.86-21.12 48-47.38.33-62.14-49.94-112.62-112-112.62zm-48-32c53.02 0 96-42.98 96-96s-42.98-96-96-96-96 42.98-96 96 42.98 96 96 96zM592 0H208c-26.47 0-48 22.25-48 49.59V96c23.42 0 45.1 6.78 64 17.8V64h352v288h-64v-64H384v64h-76.24c19.1 16.69 33.12 38.73 39.69 64H592c26.47 0 48-22.25 48-49.59V49.59C640 22.25 618.47 0 592 0z"></path></svg>

BIN
public/images/course_1312478.png Voir le fichier


BIN
public/images/file-alt-regular.png Voir le fichier


+ 1
- 0
public/images/file-alt-regular.svg Voir le fichier

@@ -0,0 +1 @@
1
+<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="file-alt" class="svg-inline--fa fa-file-alt fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"></path></svg>

BIN
public/images/file-csv.png Voir le fichier


BIN
public/images/uprrp_logo.png Voir le fichier


+ 60
- 0
public/index.php Voir le fichier

@@ -0,0 +1,60 @@
1
+<?php
2
+
3
+/**
4
+ * Laravel - A PHP Framework For Web Artisans
5
+ *
6
+ * @package  Laravel
7
+ * @author   Taylor Otwell <taylor@laravel.com>
8
+ */
9
+
10
+define('LARAVEL_START', microtime(true));
11
+
12
+/*
13
+|--------------------------------------------------------------------------
14
+| Register The Auto Loader
15
+|--------------------------------------------------------------------------
16
+|
17
+| Composer provides a convenient, automatically generated class loader for
18
+| our application. We just need to utilize it! We'll simply require it
19
+| into the script here so that we don't have to worry about manual
20
+| loading any of our classes later on. It feels great to relax.
21
+|
22
+*/
23
+
24
+require __DIR__.'/../vendor/autoload.php';
25
+
26
+/*
27
+|--------------------------------------------------------------------------
28
+| Turn On The Lights
29
+|--------------------------------------------------------------------------
30
+|
31
+| We need to illuminate PHP development, so let us turn on the lights.
32
+| This bootstraps the framework and gets it ready for use, then it
33
+| will load up this application so that we can run it and send
34
+| the responses back to the browser and delight our users.
35
+|
36
+*/
37
+
38
+$app = require_once __DIR__.'/../bootstrap/app.php';
39
+
40
+/*
41
+|--------------------------------------------------------------------------
42
+| Run The Application
43
+|--------------------------------------------------------------------------
44
+|
45
+| Once we have the application, we can handle the incoming request
46
+| through the kernel, and send the associated response back to
47
+| the client's browser allowing them to enjoy the creative
48
+| and wonderful application we have prepared for them.
49
+|
50
+*/
51
+
52
+$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
53
+
54
+$response = $kernel->handle(
55
+    $request = Illuminate\Http\Request::capture()
56
+);
57
+
58
+$response->send();
59
+
60
+$kernel->terminate($request, $response);

+ 124
- 0
public/js/app.js Voir le fichier

@@ -0,0 +1,124 @@
1
+/******/ (function(modules) { // webpackBootstrap
2
+/******/ 	// The module cache
3
+/******/ 	var installedModules = {};
4
+/******/
5
+/******/ 	// The require function
6
+/******/ 	function __webpack_require__(moduleId) {
7
+/******/
8
+/******/ 		// Check if module is in cache
9
+/******/ 		if(installedModules[moduleId]) {
10
+/******/ 			return installedModules[moduleId].exports;
11
+/******/ 		}
12
+/******/ 		// Create a new module (and put it into the cache)
13
+/******/ 		var module = installedModules[moduleId] = {
14
+/******/ 			i: moduleId,
15
+/******/ 			l: false,
16
+/******/ 			exports: {}
17
+/******/ 		};
18
+/******/
19
+/******/ 		// Execute the module function
20
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+/******/
22
+/******/ 		// Flag the module as loaded
23
+/******/ 		module.l = true;
24
+/******/
25
+/******/ 		// Return the exports of the module
26
+/******/ 		return module.exports;
27
+/******/ 	}
28
+/******/
29
+/******/
30
+/******/ 	// expose the modules object (__webpack_modules__)
31
+/******/ 	__webpack_require__.m = modules;
32
+/******/
33
+/******/ 	// expose the module cache
34
+/******/ 	__webpack_require__.c = installedModules;
35
+/******/
36
+/******/ 	// define getter function for harmony exports
37
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
38
+/******/ 		if(!__webpack_require__.o(exports, name)) {
39
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
+/******/ 		}
41
+/******/ 	};
42
+/******/
43
+/******/ 	// define __esModule on exports
44
+/******/ 	__webpack_require__.r = function(exports) {
45
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
+/******/ 		}
48
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49
+/******/ 	};
50
+/******/
51
+/******/ 	// create a fake namespace object
52
+/******/ 	// mode & 1: value is a module id, require it
53
+/******/ 	// mode & 2: merge all properties of value into the ns
54
+/******/ 	// mode & 4: return value when already ns object
55
+/******/ 	// mode & 8|1: behave like require
56
+/******/ 	__webpack_require__.t = function(value, mode) {
57
+/******/ 		if(mode & 1) value = __webpack_require__(value);
58
+/******/ 		if(mode & 8) return value;
59
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
+/******/ 		var ns = Object.create(null);
61
+/******/ 		__webpack_require__.r(ns);
62
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
+/******/ 		return ns;
65
+/******/ 	};
66
+/******/
67
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68
+/******/ 	__webpack_require__.n = function(module) {
69
+/******/ 		var getter = module && module.__esModule ?
70
+/******/ 			function getDefault() { return module['default']; } :
71
+/******/ 			function getModuleExports() { return module; };
72
+/******/ 		__webpack_require__.d(getter, 'a', getter);
73
+/******/ 		return getter;
74
+/******/ 	};
75
+/******/
76
+/******/ 	// Object.prototype.hasOwnProperty.call
77
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
+/******/
79
+/******/ 	// __webpack_public_path__
80
+/******/ 	__webpack_require__.p = "/";
81
+/******/
82
+/******/
83
+/******/ 	// Load entry module and return exports
84
+/******/ 	return __webpack_require__(__webpack_require__.s = 0);
85
+/******/ })
86
+/************************************************************************/
87
+/******/ ({
88
+
89
+/***/ "./resources/js/app.js":
90
+/*!*****************************!*\
91
+  !*** ./resources/js/app.js ***!
92
+  \*****************************/
93
+/*! no static exports found */
94
+/***/ (function(module, exports) {
95
+
96
+window.mdc.autoInit();
97
+
98
+/***/ }),
99
+
100
+/***/ "./resources/sass/app.scss":
101
+/*!*********************************!*\
102
+  !*** ./resources/sass/app.scss ***!
103
+  \*********************************/
104
+/*! no static exports found */
105
+/***/ (function(module, exports) {
106
+
107
+// removed by extract-text-webpack-plugin
108
+
109
+/***/ }),
110
+
111
+/***/ 0:
112
+/*!*************************************************************!*\
113
+  !*** multi ./resources/js/app.js ./resources/sass/app.scss ***!
114
+  \*************************************************************/
115
+/*! no static exports found */
116
+/***/ (function(module, exports, __webpack_require__) {
117
+
118
+__webpack_require__(/*! /home/jquino/projects/biol-lara/resources/js/app.js */"./resources/js/app.js");
119
+module.exports = __webpack_require__(/*! /home/jquino/projects/biol-lara/resources/sass/app.scss */"./resources/sass/app.scss");
120
+
121
+
122
+/***/ })
123
+
124
+/******/ });

+ 145
- 0
public/js/course.js Voir le fichier

@@ -0,0 +1,145 @@
1
+/******/ (function(modules) { // webpackBootstrap
2
+/******/ 	// The module cache
3
+/******/ 	var installedModules = {};
4
+/******/
5
+/******/ 	// The require function
6
+/******/ 	function __webpack_require__(moduleId) {
7
+/******/
8
+/******/ 		// Check if module is in cache
9
+/******/ 		if(installedModules[moduleId]) {
10
+/******/ 			return installedModules[moduleId].exports;
11
+/******/ 		}
12
+/******/ 		// Create a new module (and put it into the cache)
13
+/******/ 		var module = installedModules[moduleId] = {
14
+/******/ 			i: moduleId,
15
+/******/ 			l: false,
16
+/******/ 			exports: {}
17
+/******/ 		};
18
+/******/
19
+/******/ 		// Execute the module function
20
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+/******/
22
+/******/ 		// Flag the module as loaded
23
+/******/ 		module.l = true;
24
+/******/
25
+/******/ 		// Return the exports of the module
26
+/******/ 		return module.exports;
27
+/******/ 	}
28
+/******/
29
+/******/
30
+/******/ 	// expose the modules object (__webpack_modules__)
31
+/******/ 	__webpack_require__.m = modules;
32
+/******/
33
+/******/ 	// expose the module cache
34
+/******/ 	__webpack_require__.c = installedModules;
35
+/******/
36
+/******/ 	// define getter function for harmony exports
37
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
38
+/******/ 		if(!__webpack_require__.o(exports, name)) {
39
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
+/******/ 		}
41
+/******/ 	};
42
+/******/
43
+/******/ 	// define __esModule on exports
44
+/******/ 	__webpack_require__.r = function(exports) {
45
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
+/******/ 		}
48
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49
+/******/ 	};
50
+/******/
51
+/******/ 	// create a fake namespace object
52
+/******/ 	// mode & 1: value is a module id, require it
53
+/******/ 	// mode & 2: merge all properties of value into the ns
54
+/******/ 	// mode & 4: return value when already ns object
55
+/******/ 	// mode & 8|1: behave like require
56
+/******/ 	__webpack_require__.t = function(value, mode) {
57
+/******/ 		if(mode & 1) value = __webpack_require__(value);
58
+/******/ 		if(mode & 8) return value;
59
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
+/******/ 		var ns = Object.create(null);
61
+/******/ 		__webpack_require__.r(ns);
62
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
+/******/ 		return ns;
65
+/******/ 	};
66
+/******/
67
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68
+/******/ 	__webpack_require__.n = function(module) {
69
+/******/ 		var getter = module && module.__esModule ?
70
+/******/ 			function getDefault() { return module['default']; } :
71
+/******/ 			function getModuleExports() { return module; };
72
+/******/ 		__webpack_require__.d(getter, 'a', getter);
73
+/******/ 		return getter;
74
+/******/ 	};
75
+/******/
76
+/******/ 	// Object.prototype.hasOwnProperty.call
77
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
+/******/
79
+/******/ 	// __webpack_public_path__
80
+/******/ 	__webpack_require__.p = "/";
81
+/******/
82
+/******/
83
+/******/ 	// Load entry module and return exports
84
+/******/ 	return __webpack_require__(__webpack_require__.s = 2);
85
+/******/ })
86
+/************************************************************************/
87
+/******/ ({
88
+
89
+/***/ "./resources/js/course.js":
90
+/*!********************************!*\
91
+  !*** ./resources/js/course.js ***!
92
+  \********************************/
93
+/*! no static exports found */
94
+/***/ (function(module, exports) {
95
+
96
+// import {MDCDataTable} from '@material/data-table';
97
+// const dataTable = new MDCDataTable(document.querySelector('.mdc-data-table'));
98
+$(document).ready(function () {
99
+  // $('#course-table').DataTable({
100
+  //     paging: true,
101
+  //     pagingType: 'simple',
102
+  //     searching: false,
103
+  //     scrollCollapse: false,
104
+  //     columnDefs: [
105
+  //         {targets: [0,1], orderable: true},
106
+  //         {targets: '_all', orderable: false}
107
+  //     ]
108
+  // });
109
+  $(function () {
110
+    $('[data-toggle="tooltip"]').tooltip();
111
+  });
112
+  $('#modal-syllabus').on('show.bs.modal', function (event) {
113
+    var button = $(event.relatedTarget);
114
+    var courseID = button.data('course-id');
115
+    $(this).find('#modal-syllabus-form').attr('action', "/course/".concat(courseID));
116
+  });
117
+  $('#modal-section-edit').on('show.bs.modal', function (event) {
118
+    var button = $(event.relatedTarget);
119
+    var sectionID = button.data('section-id');
120
+    $(this).find('#modal-section-edit-form').attr('action', "/section/".concat(sectionID));
121
+  });
122
+});
123
+
124
+function addSection(courseID, semCode) {
125
+  var modal = $('#modal-section-create');
126
+  modal.modal('toggle');
127
+  modal.find('#modal-section-create-course_id').val(courseID);
128
+  modal.find('#modal-section-create-semester_code').val(semCode);
129
+}
130
+
131
+/***/ }),
132
+
133
+/***/ 2:
134
+/*!**************************************!*\
135
+  !*** multi ./resources/js/course.js ***!
136
+  \**************************************/
137
+/*! no static exports found */
138
+/***/ (function(module, exports, __webpack_require__) {
139
+
140
+module.exports = __webpack_require__(/*! /home/jquino/projects/biol-lara/resources/js/course.js */"./resources/js/course.js");
141
+
142
+
143
+/***/ })
144
+
145
+/******/ });

+ 69329
- 0
public/js/createPDF.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 69355
- 0
public/js/dashboard.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 119
- 0
public/js/prof.js Voir le fichier

@@ -0,0 +1,119 @@
1
+/******/ (function(modules) { // webpackBootstrap
2
+/******/ 	// The module cache
3
+/******/ 	var installedModules = {};
4
+/******/
5
+/******/ 	// The require function
6
+/******/ 	function __webpack_require__(moduleId) {
7
+/******/
8
+/******/ 		// Check if module is in cache
9
+/******/ 		if(installedModules[moduleId]) {
10
+/******/ 			return installedModules[moduleId].exports;
11
+/******/ 		}
12
+/******/ 		// Create a new module (and put it into the cache)
13
+/******/ 		var module = installedModules[moduleId] = {
14
+/******/ 			i: moduleId,
15
+/******/ 			l: false,
16
+/******/ 			exports: {}
17
+/******/ 		};
18
+/******/
19
+/******/ 		// Execute the module function
20
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+/******/
22
+/******/ 		// Flag the module as loaded
23
+/******/ 		module.l = true;
24
+/******/
25
+/******/ 		// Return the exports of the module
26
+/******/ 		return module.exports;
27
+/******/ 	}
28
+/******/
29
+/******/
30
+/******/ 	// expose the modules object (__webpack_modules__)
31
+/******/ 	__webpack_require__.m = modules;
32
+/******/
33
+/******/ 	// expose the module cache
34
+/******/ 	__webpack_require__.c = installedModules;
35
+/******/
36
+/******/ 	// define getter function for harmony exports
37
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
38
+/******/ 		if(!__webpack_require__.o(exports, name)) {
39
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
+/******/ 		}
41
+/******/ 	};
42
+/******/
43
+/******/ 	// define __esModule on exports
44
+/******/ 	__webpack_require__.r = function(exports) {
45
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
+/******/ 		}
48
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49
+/******/ 	};
50
+/******/
51
+/******/ 	// create a fake namespace object
52
+/******/ 	// mode & 1: value is a module id, require it
53
+/******/ 	// mode & 2: merge all properties of value into the ns
54
+/******/ 	// mode & 4: return value when already ns object
55
+/******/ 	// mode & 8|1: behave like require
56
+/******/ 	__webpack_require__.t = function(value, mode) {
57
+/******/ 		if(mode & 1) value = __webpack_require__(value);
58
+/******/ 		if(mode & 8) return value;
59
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
+/******/ 		var ns = Object.create(null);
61
+/******/ 		__webpack_require__.r(ns);
62
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
+/******/ 		return ns;
65
+/******/ 	};
66
+/******/
67
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68
+/******/ 	__webpack_require__.n = function(module) {
69
+/******/ 		var getter = module && module.__esModule ?
70
+/******/ 			function getDefault() { return module['default']; } :
71
+/******/ 			function getModuleExports() { return module; };
72
+/******/ 		__webpack_require__.d(getter, 'a', getter);
73
+/******/ 		return getter;
74
+/******/ 	};
75
+/******/
76
+/******/ 	// Object.prototype.hasOwnProperty.call
77
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
+/******/
79
+/******/ 	// __webpack_public_path__
80
+/******/ 	__webpack_require__.p = "/";
81
+/******/
82
+/******/
83
+/******/ 	// Load entry module and return exports
84
+/******/ 	return __webpack_require__(__webpack_require__.s = 1);
85
+/******/ })
86
+/************************************************************************/
87
+/******/ ({
88
+
89
+/***/ "./resources/js/prof.js":
90
+/*!******************************!*\
91
+  !*** ./resources/js/prof.js ***!
92
+  \******************************/
93
+/*! no static exports found */
94
+/***/ (function(module, exports) {
95
+
96
+$(document).ready(function () {
97
+  $('#modal-professor-loads').on('show.bs.modal', function (event) {
98
+    var button = $(event.relatedTarget);
99
+    var semCode = button.data('semester-code');
100
+    $(this).find('#modal-professor-loads-semester_code').val(semCode);
101
+    console.log(1);
102
+  });
103
+});
104
+
105
+/***/ }),
106
+
107
+/***/ 1:
108
+/*!************************************!*\
109
+  !*** multi ./resources/js/prof.js ***!
110
+  \************************************/
111
+/*! no static exports found */
112
+/***/ (function(module, exports, __webpack_require__) {
113
+
114
+module.exports = __webpack_require__(/*! /home/jquino/projects/biol-lara/resources/js/prof.js */"./resources/js/prof.js");
115
+
116
+
117
+/***/ })
118
+
119
+/******/ });

+ 8
- 0
public/mix-manifest.json Voir le fichier

@@ -0,0 +1,8 @@
1
+{
2
+    "/js/app.js": "/js/app.js",
3
+    "/css/app.css": "/css/app.css",
4
+    "/js/course.js": "/js/course.js",
5
+    "/js/createPDF.js": "/js/createPDF.js",
6
+    "/js/dashboard.js": "/js/dashboard.js",
7
+    "/js/prof.js": "/js/prof.js"
8
+}

+ 0
- 0
public/robots.txt Voir le fichier


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff