Changeset c5e383e


Ignore:
Timestamp:
12/26/21 18:31:54 (2 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
master
Parents:
62d01a6
Message:

added db and storage backup

Files:
26 added
2 deleted
13 edited
1 moved

Legend:

Unmodified
Added
Removed
  • app/Console/Kernel.php

    r62d01a6 rc5e383e  
    2626    {
    2727        // $schedule->command('inspire')->hourly();
     28        //$schedule->command('backup:clean')->daily()->at('17:00');
     29        $schedule->command('backup:run')->daily()->at('08:00');
    2830    }
    2931
  • app/Http/Controllers/Auth/CreatePasswordController.php

    r62d01a6 rc5e383e  
    1616    public function showCreatePassword($id, $token)
    1717    {
    18         return view("auth.create_password")->with([
     18        return view("auth.new_password")->with([
    1919            "id" => $id,
    2020            "token" => $token
  • app/Http/Controllers/Auth/LoginController.php

    r62d01a6 rc5e383e  
    4545        }
    4646
    47         //$user->security_code = rand(10000, 99999);
     47        $user->security_code = rand(10000, 99999);
    4848        if ($user->is_forgot_password) {
    4949            $user->is_forgot_password = false;
    5050        }
    5151
    52             $user->security_code = 1234;
     52            //$user->security_code = 1234;
    5353            $user->verify_token = Str::uuid();
    5454            $user->is_online = true;
  • app/Http/Controllers/Dashboard/DepartmentsController.php

    r62d01a6 rc5e383e  
    2323    {
    2424        return view("dashboard.departments.index")->with([
    25             "departments" => Department::all(),
     25            "departments" => Department::all()
    2626        ]);
    2727    }
  • app/Models/Department.php

    r62d01a6 rc5e383e  
    2626        return $this->belongsTo(User::class);
    2727    }
    28 
    2928}
  • app/Notifications/ForgotPassword.php

    r62d01a6 rc5e383e  
    4545        return (new MailMessage)
    4646                    ->greeting("Hello " . $this->user->name)
    47                     ->line("To create or change your password click on the button")
     47                    ->line("To change your password click on the button")
    4848                    ->line("Your security code is: " . $this->user->security_code )
    49                     ->action("Create Password", url("/auth/create-password/" . $this->user->id . "/" . $this->user->verify_token));
     49                    ->action("Change Password", url("/auth/new-password/" . $this->user->id . "/" . $this->user->verify_token));
    5050    }
    5151
  • app/Notifications/WelcomeUser.php

    r62d01a6 rc5e383e  
    5050            ->line("To create password for your account just click the button then create something good. :))")
    5151            ->line("NOTE: You have only 3 hours to create your password.")
    52             ->action("Create Password", url("/auth/create-password/" . $this->user->id . "/" . $this->user->verify_token));
     52            ->action("Create Password", url("/auth/new-password/" . $this->user->id . "/" . $this->user->verify_token));
    5353    }
    5454
  • composer.json

    r62d01a6 rc5e383e  
    77    "require": {
    88        "php": "^7.3|^8.0",
     9        "ext-bcmath": "*",
    910        "ext-zip": "*",
    1011        "fakerphp/faker": "^1.16",
     
    1718        "maatwebsite/excel": "^3.1",
    1819        "silviolleite/laravelpwa": "^2.0",
    19         "ext-bcmath": "*"
     20        "spatie/laravel-backup": "^6.16"
    2021    },
    2122    "require-dev": {
  • composer.lock

    r62d01a6 rc5e383e  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "179a45da244d122380b3d72ee89ad030",
     7    "content-hash": "c9218e0014faef83c6bfe53b7ad249dd",
    88    "packages": [
    99        {
     
    35713571        },
    35723572        {
     3573            "name": "spatie/db-dumper",
     3574            "version": "2.21.1",
     3575            "source": {
     3576                "type": "git",
     3577                "url": "https://github.com/spatie/db-dumper.git",
     3578                "reference": "05e5955fb882008a8947c5a45146d86cfafa10d1"
     3579            },
     3580            "dist": {
     3581                "type": "zip",
     3582                "url": "https://api.github.com/repos/spatie/db-dumper/zipball/05e5955fb882008a8947c5a45146d86cfafa10d1",
     3583                "reference": "05e5955fb882008a8947c5a45146d86cfafa10d1",
     3584                "shasum": ""
     3585            },
     3586            "require": {
     3587                "php": "^7.2|^8.0",
     3588                "symfony/process": "^4.2|^5.0"
     3589            },
     3590            "require-dev": {
     3591                "phpunit/phpunit": "^7.0|^8.0|^9.0"
     3592            },
     3593            "type": "library",
     3594            "autoload": {
     3595                "psr-4": {
     3596                    "Spatie\\DbDumper\\": "src"
     3597                }
     3598            },
     3599            "notification-url": "https://packagist.org/downloads/",
     3600            "license": [
     3601                "MIT"
     3602            ],
     3603            "authors": [
     3604                {
     3605                    "name": "Freek Van der Herten",
     3606                    "email": "freek@spatie.be",
     3607                    "homepage": "https://spatie.be",
     3608                    "role": "Developer"
     3609                }
     3610            ],
     3611            "description": "Dump databases",
     3612            "homepage": "https://github.com/spatie/db-dumper",
     3613            "keywords": [
     3614                "database",
     3615                "db-dumper",
     3616                "dump",
     3617                "mysqldump",
     3618                "spatie"
     3619            ],
     3620            "support": {
     3621                "issues": "https://github.com/spatie/db-dumper/issues",
     3622                "source": "https://github.com/spatie/db-dumper/tree/2.21.1"
     3623            },
     3624            "funding": [
     3625                {
     3626                    "url": "https://github.com/spatie",
     3627                    "type": "github"
     3628                }
     3629            ],
     3630            "time": "2021-02-24T14:56:42+00:00"
     3631        },
     3632        {
     3633            "name": "spatie/laravel-backup",
     3634            "version": "6.16.5",
     3635            "source": {
     3636                "type": "git",
     3637                "url": "https://github.com/spatie/laravel-backup.git",
     3638                "reference": "332fae80b12cacb9e4161824ba195d984b28c8fb"
     3639            },
     3640            "dist": {
     3641                "type": "zip",
     3642                "url": "https://api.github.com/repos/spatie/laravel-backup/zipball/332fae80b12cacb9e4161824ba195d984b28c8fb",
     3643                "reference": "332fae80b12cacb9e4161824ba195d984b28c8fb",
     3644                "shasum": ""
     3645            },
     3646            "require": {
     3647                "ext-zip": "^1.14.0",
     3648                "illuminate/console": "^6.0|^7.0|^8.0",
     3649                "illuminate/contracts": "^6.0|^7.0|^8.0",
     3650                "illuminate/events": "^6.0|^7.0|^8.0",
     3651                "illuminate/filesystem": "^6.0|^7.0|^8.0",
     3652                "illuminate/notifications": "^6.0|^7.0|^8.0",
     3653                "illuminate/support": "^6.0|^7.0|^8.0",
     3654                "league/flysystem": "^1.0.49",
     3655                "php": "^7.3|^8.0",
     3656                "spatie/db-dumper": "^2.12",
     3657                "spatie/temporary-directory": "^1.1",
     3658                "symfony/finder": "^4.2|^5.0"
     3659            },
     3660            "require-dev": {
     3661                "laravel/slack-notification-channel": "^2.3",
     3662                "league/flysystem-aws-s3-v3": "^1.0",
     3663                "mockery/mockery": "^1.4.2",
     3664                "orchestra/testbench": "4.*|5.*|6.*",
     3665                "phpunit/phpunit": "^8.4|^9.0"
     3666            },
     3667            "suggest": {
     3668                "laravel/slack-notification-channel": "Required for sending notifications via Slack"
     3669            },
     3670            "type": "library",
     3671            "extra": {
     3672                "laravel": {
     3673                    "providers": [
     3674                        "Spatie\\Backup\\BackupServiceProvider"
     3675                    ]
     3676                }
     3677            },
     3678            "autoload": {
     3679                "psr-4": {
     3680                    "Spatie\\Backup\\": "src"
     3681                },
     3682                "files": [
     3683                    "src/Helpers/functions.php"
     3684                ]
     3685            },
     3686            "notification-url": "https://packagist.org/downloads/",
     3687            "license": [
     3688                "MIT"
     3689            ],
     3690            "authors": [
     3691                {
     3692                    "name": "Freek Van der Herten",
     3693                    "email": "freek@spatie.be",
     3694                    "homepage": "https://spatie.be",
     3695                    "role": "Developer"
     3696                }
     3697            ],
     3698            "description": "A Laravel package to backup your application",
     3699            "homepage": "https://github.com/spatie/laravel-backup",
     3700            "keywords": [
     3701                "backup",
     3702                "database",
     3703                "laravel-backup",
     3704                "spatie"
     3705            ],
     3706            "support": {
     3707                "issues": "https://github.com/spatie/laravel-backup/issues",
     3708                "source": "https://github.com/spatie/laravel-backup/tree/6.16.5"
     3709            },
     3710            "funding": [
     3711                {
     3712                    "url": "https://github.com/sponsors/spatie",
     3713                    "type": "github"
     3714                },
     3715                {
     3716                    "url": "https://spatie.be/open-source/support-us",
     3717                    "type": "other"
     3718                }
     3719            ],
     3720            "time": "2021-09-12T10:04:18+00:00"
     3721        },
     3722        {
     3723            "name": "spatie/temporary-directory",
     3724            "version": "1.3.0",
     3725            "source": {
     3726                "type": "git",
     3727                "url": "https://github.com/spatie/temporary-directory.git",
     3728                "reference": "f517729b3793bca58f847c5fd383ec16f03ffec6"
     3729            },
     3730            "dist": {
     3731                "type": "zip",
     3732                "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/f517729b3793bca58f847c5fd383ec16f03ffec6",
     3733                "reference": "f517729b3793bca58f847c5fd383ec16f03ffec6",
     3734                "shasum": ""
     3735            },
     3736            "require": {
     3737                "php": "^7.2|^8.0"
     3738            },
     3739            "require-dev": {
     3740                "phpunit/phpunit": "^8.0|^9.0"
     3741            },
     3742            "type": "library",
     3743            "autoload": {
     3744                "psr-4": {
     3745                    "Spatie\\TemporaryDirectory\\": "src"
     3746                }
     3747            },
     3748            "notification-url": "https://packagist.org/downloads/",
     3749            "license": [
     3750                "MIT"
     3751            ],
     3752            "authors": [
     3753                {
     3754                    "name": "Alex Vanderbist",
     3755                    "email": "alex@spatie.be",
     3756                    "homepage": "https://spatie.be",
     3757                    "role": "Developer"
     3758                }
     3759            ],
     3760            "description": "Easily create, use and destroy temporary directories",
     3761            "homepage": "https://github.com/spatie/temporary-directory",
     3762            "keywords": [
     3763                "php",
     3764                "spatie",
     3765                "temporary-directory"
     3766            ],
     3767            "support": {
     3768                "issues": "https://github.com/spatie/temporary-directory/issues",
     3769                "source": "https://github.com/spatie/temporary-directory/tree/1.3.0"
     3770            },
     3771            "time": "2020-11-09T15:54:21+00:00"
     3772        },
     3773        {
    35733774            "name": "swiftmailer/swiftmailer",
    35743775            "version": "v6.3.0",
     
    86098810    "platform": {
    86108811        "php": "^7.3|^8.0",
    8611         "ext-zip": "*",
    8612         "ext-bcmath": "*"
     8812        "ext-bcmath": "*",
     8813        "ext-zip": "*"
    86138814    },
    86148815    "platform-dev": [],
  • config/database.php

    r62d01a6 rc5e383e  
    6161            'strict' => true,
    6262            'engine' => null,
     63            'dump' => [
     64                'dump_binary_path' => 'C:/laragon/bin/mysql/mysql-5.7.33-winx64/bin/',
     65            ],
    6366            'options' => extension_loaded('pdo_mysql') ? array_filter([
    6467                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
  • config/filesystems.php

    r62d01a6 rc5e383e  
    4646        ],
    4747
    48         'image-uploads' => [
    49             'driver' => 'local',
    50             'root'   => public_path() . DIRECTORY_SEPARATOR .'assets' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'uploads'
    51         ],
    52 
    5348        'public' => [
    5449            'driver' => 'local',
  • database/factories/FolderFactory.php

    r62d01a6 rc5e383e  
    2727    public function definition()
    2828    {
    29         $inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95];
    30         $deptId = Arr::random($inputArray);
     29        //$inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95];
     30        //$deptId = Arr::random($inputArray);
    3131
    32         //$deptId = $this->faker->numberBetween(1, 10);
     32        $deptId = $this->faker->numberBetween(1, 10);
    3333
    3434        $deptCode = Department::find($deptId)->code;
  • resources/views/auth/new_password.blade.php

    r62d01a6 rc5e383e  
    11@extends('layouts.auth')
    22
    3 @section("title", "SaveSpace - Create password")
     3@section("title", "SaveSpace - New password")
    44
    55@section('content')
     
    1111    <!-- ./ logo -->
    1212
    13     <h5>Create password</h5>
     13    <h5>New password</h5>
    1414
    1515    <!-- form -->
    16     <form action="{{ route("auth.create-password", ["id" => $id, "token" => $token]) }}" method="post">
     16    <form action="{{ route("auth.new-password", ["id" => $id, "token" => $token]) }}" method="post">
    1717        @csrf
    1818
     
    2626            <input type="text" id="security_code" class="form-control" name="security_code" autocomplete="off" placeholder="Security code" required>
    2727        </div>
    28         <input type="submit" value="Create Password" class="btn btn-primary btn-block">
     28        <input type="submit" value="Submit" class="btn btn-primary btn-block">
    2929        <hr>
    3030     </form>
  • routes/web.php

    r62d01a6 rc5e383e  
    3737
    3838    Route::group(['middleware' => "createPassword"], function () {
    39         Route::get('/create-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.create-password-show");
    40         Route::post('/create-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.create-password");
     39        Route::get('/new-password/{id}/{token}', "Auth\CreatePasswordController@showCreatePassword")->name("auth.new-password-show");
     40        Route::post('/new-password/{id}/{token}', "Auth\CreatePasswordController@createPassword")->name("auth.new-password");
    4141    });
    4242
Note: See TracChangeset for help on using the changeset viewer.